How to put 8 variables into a single matrix?
古いコメントを表示
I have 8 variables each of them having dimension(65,1). I want to put them in a matrix of dimension(65,8). Please suggest me how to do it using matlab code.
Devendra
採用された回答
その他の回答 (1 件)
Nupur
2023 年 7 月 1 日
0 投票
Try the following please:
% Assuming you have eight variables: var1, var2, var3, var4, var5, var6, var7, var8
% Combine the variables into a matrix
combinedMatrix = [var1, var2, var3, var4, var5, var6, var7, var8];
% Alternatively, you can use the horzcat function
% combinedMatrix = horzcat(var1, var2, var3, var4, var5, var6, var7, var8);
% Display the size of the combined matrix
disp(size(combinedMatrix));
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!