Calq commands and keywords

Keyword

for

Definition

This keyword is used to make a loop that executes the loop body a set amount of times. A control variable is initialized to the starting value, and it is incremented after every time the body is executed until it exceeds the final amount. The end keyword marks the conclusion of the loop body.

Example

  for k=1:3
    disp('hello world');
  end
  for m=0.2:0.1:0.4
    disp('loop index is ' + m);
  end

See also

end, if, and while.


What is Calq?
Latest version of Calq
Digital Wave Systems Lab homepage