i would like to get all values of for loop outside loop,but this program gives me the last value only

조회 수: 2 (최근 30일)
for i=1:5
x(i)=i+1;
end
disp(x(i));

채택된 답변

Walter Roberson
Walter Roberson 2015년 7월 4일
disp(x);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by