Create a table, `A`.

A = table([5;12;23;2;6],...
{'cereal';'pizza';'salmon';'cookies';'pizza'},...
'VariableNames',{'Age','FavoriteFood'},...
'RowNames',{'Amy','Bobby','Holly','Harry','Sally'})

A =
Age FavoriteFood
___ ____________
Amy 5 'cereal'
Bobby 12 'pizza'
Holly 23 'salmon'
Harry 2 'cookies'
Sally 6 'pizza'

Create a table, `B`, with one variable
in common with `A`.

B = table({'cereal';'cookies';'pizza';'salmon';'cake'},...
[110;160;140;367;243],...
{'B';'D';'B-';'A';'C-'},...
'VariableNames',{'FavoriteFood','Calories','NutritionGrade'})

B =
FavoriteFood Calories NutritionGrade
____________ ________ ______________
'cereal' 110 'B'
'cookies' 160 'D'
'pizza' 140 'B-'
'salmon' 367 'A'
'cake' 243 'C-'

Create a new table, `C`, with data from
tables `A` and `B`. Use `FavoriteFood` as
a key variable to the `join` function.

C = join(A,B)

C =
Age FavoriteFood Calories NutritionGrade
___ ____________ ________ ______________
Amy 5 'cereal' 110 'B'
Bobby 12 'pizza' 140 'B-'
Holly 23 'salmon' 367 'A'
Harry 2 'cookies' 160 'D'
Sally 6 'pizza' 140 'B-'

Table `C` does not include information from
the last row of table `B` about `'cake'` since
there is no corresponding entry in table `A`.