Department of Engineering
University of Cambridge
>
Engineering Department
>
computing help
Next:
switch
Up:
Programming Constructs
Previous:
while
for
This command is often not needed because matlab functions (
sin
for example) often work on whole arrays. The loop below adds an element to
back
on each iteration.
back=[]; for k=10: -1 : 1, back=[back,k] end
|
computing help
|
©
Cambridge University Engineering Dept
Information provided by
Tim Love
2006-07-24