for

for

parfor

for loop.

Syntax

  • for variable = expression, statements, end

  • for variable, statements, end

Description

for loop executes a set of statements with an index variable looping through each element in a vector.

parfor is currently an alias on for keyword.

Examples

for i = 1:10, disp(i), end
for i = [1, 2; 3 4], disp(i), disp('next'), end

See also

while.

History

VersionDescription

1.0.0

initial version

Author

Allan CORNET

Last updated