ans = 1x2 cell array
{'LastName'} {'Variables'}
Perform an inner join on A and B using LastName and FirstName as key variables.
B.Properties.DimensionNames{1} = 'LastName';
D = innerjoin(A,B,'Keys',{'LastName','FirstName'})
D=2×5 table
FirstName Age Height Weight BloodPressure
Garcia 'Michael' 38 64 119 122 80
Wu 'Alice' 45 67 133 117 75
Notes on Use of Table Functions and Row Labels
- You cannot stack or unstack row labels using the stack and unstack functions.
However, you can use row labels as grouping variables. - You cannot perform a join using the join, innerjoin, or outerjoin functions when
the first argument is a table and the second argument is a timetable. However, you can
perform a join when both arguments are tables, both are timetables, or the first
argument is a timetable and the second is a table. - The output of a join operation can have row labels if you specify row labels as key
variables. For more details on row labels from a join operation, see the documentation
on the 'Keys', 'LeftKeys', and 'RightKeys' arguments of the join, innerjoin,
and outerjoin functions.
See Also
innerjoin | join | outerjoin | rowfun | sortrows | stack | unstack | varfun
See Also