T = outerjoin(left, right)
T = outerjoin(left, right, 'Keys', keys)
T = outerjoin(left, right, 'MergeKeys', true)
T = outerjoin(left, right, 'LeftVariables', leftVars, 'RightVariables', rightVars)
| Parameter | Description |
|---|---|
| left, right | Input tables. |
| keys | Key variable names. |
| leftVars, rightVars | Variables to keep from the left and right tables. |
| Parameter | Description |
|---|---|
| T | Table containing joined rows. |
outerjoin combines rows from both tables and preserves unmatched rows according to the selected join type. The 'MergeKeys' option merges key columns in the output.
L = table([1; 2], [10; 20], 'VariableNames', {'Key', 'LeftValue'});
R = table([2; 3], [200; 300], 'VariableNames', {'Key', 'RightValue'});
J = outerjoin(L, R, 'Keys', 'Key')
| Version | Description |
|---|---|
| 2.0.0 | initial version |