matrix concatenation
显示 更早的评论
I need to create a text file with 3 columns. first two columns are of the same size, 100. The 3rd column just has one number in it. How can I do that?
采纳的回答
更多回答(1 个)
Sean de Wolski
2012-2-21
Do you want the third column to have 100 values the same?
If so:
A = [c1,c2,repmat(c3,100,1)];
If not:
A = [{c1} {c2} {c3}]
for more info:
doc cell
3 个评论
Baba
2012-2-21
Baba
2012-2-21
Walter Roberson
2012-2-21
In order to do it with dlmwrite(), you would have to make two dlmwrite() calls, with the second using the -append option.
类别
在 帮助中心 和 File Exchange 中查找有关 Text Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!