Octave fun: Difference between revisions

Jump to navigation Jump to search
34 bytes added ,  13 June 2019
→‎Octave tree: Use a gif for illustration.
(→‎Octave fun scripts: Inline code example and overhaul code.)
(→‎Octave tree: Use a gif for illustration.)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Octave fun scripts ==
Writing programs (not only in Octave) is often seen as a boring activity.  
Writing programs (not only in Octave) is often seen as a boring activity.  
To see this is not true one can look at the samples below:
To see this is not true one can look at the samples below:


Octave tree: [[File:OctaveTree.png|500px]]
== Octave tree ==
 
[[File:OctaveTree.gif|frame|Output of {{Path|OctaveTree.m}}.]]


<syntaxhighlight lang="octave">
{{File|OctaveTree.m|<syntaxhighlight lang="octave">
N = 25;  # Height
N = 25;  # Height
H = 7;  # Trunk height
H = 7;  # Trunk height
Line 48: Line 47:
   i++;
   i++;
endwhile
endwhile
</syntaxhighlight>
</syntaxhighlight>}}


[[Category:Examples]]
[[Category:Examples]]

Navigation menu