Problem outerjoin two tables 20x1 ; 20x8

1 回表示 (過去 30 日間)
Bastiaan Pierik
Bastiaan Pierik 2021 年 1 月 25 日
回答済み: Stephen23 2021 年 1 月 25 日
%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)

採用された回答

Stephen23
Stephen23 2021 年 1 月 25 日
I don't see why outerjoin is required:
newTable = [ArrayTime,ArrayZ]

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by