Adding rows as a column
3 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I would like to add a new columns which consist of rows of the table:
As seen in the figures, I want to redesign my dataset in a dynamic way. Could you please help?
Thanks in advance
0 件のコメント
採用された回答
Voss
2022 年 10 月 26 日
My guess:
% matrix as in 1.png:
data = reshape(1:21,3,[]).'
% new columns to be added:
new_data = (4:9)+3*(0:6).'
% append the new columns to the end of data matrix:
data = [data new_data]
0 件のコメント
その他の回答 (1 件)
the cyclist
2022 年 10 月 26 日
You really don't give enough detail about what you are trying to do. You are making us assume and/or guess too much. Maybe you want the reshape command?
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!