i have a for loop and a vector in this loop that chang each loop that spend how can save this vector in all times ?
조회 수: 2 (최근 30일)
이전 댓글 표시
like this code: h=1000 for i=1:h m=[i j] end that j change with every i how can save m vectors that produce in each time at loop?
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2013년 10월 18일
편집: Azzi Abdelmalek
2013년 10월 18일
h=1000
m=zeros(1000,2)
for i=1:h
m(i,:)=[i i+1]; %for example
end
disp(m)
댓글 수: 3
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!