I can I duplicate raws of variables?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have imported an xls file spread sheet and I need to replicate six time each raw.
Ex. a1,b1,c1,d1 a2,b2,c2,d2 .................. ..................
Into a1,b1,c1,d1 a1,b1,c1,d1 a1,b1,c1,d1 a1,b1,c1,d1 a1,b1,c1,d1 a1,b1,c1,d1
a2,b2,c2,d2 a2,b2,c2,d2 a2,b2,c2,d2 a2,b2,c2,d2 a2,b2,c2,d2 .................. ..................
댓글 수: 0
채택된 답변
Youssef Khmou
2014년 11월 27일
try this standard method
a=[1:3];
b=[];
for n=1:6
b=[b a];
end
댓글 수: 2
Youssef Khmou
2014년 11월 28일
hi Maria, you add a semicolon to the above code :
%....
b=[]
for n=1:6
b=[b;a];
end
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!