My apologies for the re-post, but my original had a typo in the subject line, make it likely that no one will recognize the outerjoin command. Also, I had errors in my closing 3 points. Here is the corrected post.
According to
http://www.mathworks.com/help/matlab/ref/outerjoin.html, If you specify, 'MergeKeys',true, then outerjoin includes all key variables in the output table, C, and overrides the inclusion or exclusion of key variables specified via the 'LeftVariables' and 'RightVariables' name-value pair arguments.
I'm finding this to be untrue:
x=floor(10*rand(4,2))
y=floor(10*rand(4,2))
outerjoin( ...
array2table(x), array2table(y), ...
'Leftkeys',2, 'Rightkeys',1, ...
'MergeKeys', true, ...
'LeftVariables',1, 'RightVariables',2 ...
)
The key variable is x2 (merged with y1. It doesn't show up in the output:
x =
3 6
9 7
6 6
6 3
y =
1 0
0 9
1 3
3 9
ans =
x1 y2
___ ___
NaN 9
NaN 0
NaN 3
6 9
3 NaN
6 NaN
9 NaN
I'm wondering if:
(1) I'm mistaken,
(2) the documentation is wrong and hence will change, or
(3) the function behaviour is wrong and hence will change.