matrix concatenation
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (1)
Sean de Wolski
am 21 Feb. 2012
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 Kommentare
Baba
am 21 Feb. 2012
Baba
am 21 Feb. 2012
Walter Roberson
am 21 Feb. 2012
In order to do it with dlmwrite(), you would have to make two dlmwrite() calls, with the second using the -append option.
Kategorien
Mehr zu Text Files finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!