diff --git a/octave/octave-crib.org b/octave/octave-crib.org index 5472354..00f896c 100644 --- a/octave/octave-crib.org +++ b/octave/octave-crib.org @@ -20,6 +20,7 @@ #+html_head: #+html_head: #+html_head: +#+html_head: #+html_link_home: ../../../index.html #+html_link_up: ../../../index.html @@ -32,6 +33,11 @@ octave> #+end_example +** comments + #+begin_example + octave> x=2 % everything after the % is ignored + #+end_example + ** directory commands from octave prompt #+begin_example octave> pwd @@ -60,6 +66,21 @@ ans = 26 #+end_example +** for-loops + #+begin_example + octave> fib=ones(1,11); + octave> fib(1)=0; + octave> for i=3:11 + octave> fib(i)=fib(i-1)+fib(i-2); + octave> endfor + octave> fib + #+end_example + + #+begin_example + fib = + 0 1 1 2 3 5 8 13 21 34 55 + #+end_example + * Provenance - ~.org~ source for this page is here: file:octave-crib-src.org - git hash: src_sh{git rev-parse HEAD}