필터 지우기
필터 지우기

can i write simple for loop in the command window

조회 수: 60 (최근 30일)
Andrew Kreitzman
Andrew Kreitzman 2013년 8월 1일
Have some output data and I need to organize it. simple for loop will do but can i write it in the command window?

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 8월 1일
편집: Azzi Abdelmalek 2013년 8월 1일
for k=1:3;a(k)=k^2;end
%or
for k=1:3,...
a(k)=k^2,...
end
  댓글 수: 1
Andrew Kreitzman
Andrew Kreitzman 2013년 8월 1일
ohhhh i wasn't adding the colon after the for. thanks!

댓글을 달려면 로그인하십시오.

카테고리

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