Anonymous user
Loops/For with a specified step: Difference between revisions
→{{header|MATLAB}} / {{header|Octave}}: loops with step size different than 1
(adding sas) |
(→{{header|MATLAB}} / {{header|Octave}}: loops with step size different than 1) |
||
Line 455:
17
</pre>
=={{header|MATLAB}} / {{header|Octave}}==
<lang Matlab> for k = 0:10:100,
printf('%d\n',k)
end; </lang>
A vectorized version of the code is
<lang Matlab> printf('%d\n',0:10:100); </lang>
=={{header|Modula-2}}==
|