필터 지우기
필터 지우기

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?

채택된 답변

Azzi Abdelmalek
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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by