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!