How can the output be written in a new column (without overwriting the previous one)
1 回表示 (過去 30 日間)
古いコメントを表示
I am processing several images and use loop for the series. I need to write the output of each loop in a new line beside the previous column.
for example: for the first loop I want data in column 2, for the second loop I want data in column 3 beside column 2
would you help me please?
0 件のコメント
回答 (1 件)
M
2019 年 2 月 11 日
編集済み: M
2019 年 2 月 11 日
You can use cell for that. You can try and adapt the following example:
a=cell(3,1);
for i=1:3
a{i}=ones(i,1);
end
a =
3×1 cell array
{[ 1]}
{2×1 double}
{3×1 double}
7 件のコメント
M
2019 年 2 月 12 日
the output file should be filled out horizontally and it is not possible to do it vertically
You can do it both ways, you have to adapt the indexing.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!