what does it mean
조회 수: 1 (최근 30일)
이전 댓글 표시
for k = (i-1):-1:1
댓글 수: 0
채택된 답변
Image Analyst
2015년 3월 7일
When you say
for k = start : step : stop
the first expression, (i-1) in your case, will be the first/starting value of the loop iterator k. Then the next iteration k will be start+step, or i-1-1 = i-2 in your case. It keeps going until it gets to the "stop" value or goes past it (i.e., goes above it if the step is positive, or below it if the step value is negative). This is basic stuff. Please read the getting started section of the help for more essential information.
댓글 수: 0
추가 답변 (1개)
rantunes
2015년 3월 7일
Hey
You can answer your question by running:
for k = (i-1):-1:1;
k
end
Greets
댓글 수: 1
참고 항목
카테고리
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!