join
Join tables by key variables.
📝Syntax
T = join(left, right)
T = join(left, right, 'Keys', keys)
T = join(left, right, 'LeftVariables', leftVars, 'RightVariables', rightVars)
📥Input Arguments
Parameter Description
left, right Input tables.
keys Key variable names.
leftVars, rightVars Variables to keep from the left and right tables.
📤Output Arguments
Parameter Description
T Joined table.
📄Description

join combines rows from two tables using matching key values.

💡Examples
L = table([1; 2], [10; 20], 'VariableNames', {'Key', 'LeftValue'});
R = table([2; 3], [200; 300], 'VariableNames', {'Key', 'RightValue'});
J = join(L, R, 'Keys', 'Key')
🔗See Also
innerjoinouterjoin
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub