Problem outerjoin two tables 20x1 ; 20x8
1 view (last 30 days)
Show older comments
%a string of delimiters TC1 and so on
str='TC1;TC2;TC3;TC4;C1;C2;C3;C4'
%create random variables resembling temperature range -10 till 80 20 variables over each 4 rows str2= randi([-10,80],20,4)
%filtering the string on semicolon and place them in rows
output_str=strread(str,'%s','delimiter',';')
str2= randi([-10,80],20,8);
tl=linspace(1,1,20)';
%attaching both strings and create a table.
ArrayZ=array2table(str2,'VariableNames',output_str)
%add array Time ArrayTime=array2table(tl,'VariableNames',"time")
%why can’t I write the two arrays together I have defined both arrays I would like to attach the array on the left side.
Tabletotal=outerjoin(ArrayTime,'MergeKeys',ArrayZ)
0 Comments
Accepted Answer
Stephen23
on 25 Jan 2021
I don't see why outerjoin is required:
newTable = [ArrayTime,ArrayZ]
0 Comments
More Answers (0)
See Also
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!