Using Octave: Difference between revisions

Jump to navigation Jump to search
5 bytes added ,  21 April 2017
(→‎Plotting: Add missing image.)
(2 intermediate revisions by one other user not shown)
Line 112: Line 112:




= Control flow wih loops =
= Control flow with loops =


Octave supports <code>for</code> and <code>while</code> loops, as well as other control flow
Octave supports <code>for</code> and <code>while</code> loops, as well as other control flow
Line 126: Line 126:
k = 1;
k = 1;
step = 2;
step = 2;
while (k <= (100-step))
while (k <= 100)
   y(i) = k^2;
   y(k) = k^2;
   k = k + step;
   k = k + step;
endwhile</syntaxhighlight>
endwhile</syntaxhighlight>


= Vectorization =
= Vectorization =
Line 161: Line 159:
ylabel ('w');</syntaxhighlight>
ylabel ('w');</syntaxhighlight>


[[File:Using octave-1.png]]
[[File:Using octave-1.png|thumb|center]]


= Strings =
= Strings =
Anonymous user

Navigation menu