1 #+Title: a collection of examples for ob-maxima tests
6 :ID: b5842ed4-8e8b-4b18-a1c9-cef006b6a6c8
8 #+begin_src maxima :var s=4 :results silent
13 #+begin_src maxima :var fun="sin(x)" :var q=2 :results silent
14 print(diff(fun, x, q))$
19 #+begin_src maxima :var a=0.5 :results graphics :file maxima-test-sin.png
20 plot2d(sin(a*x), [x, 0, 2*%pi])$
23 #+begin_src maxima :results graphics :file maxima-test-3d.png
24 plot3d (2^(-u^2 + v^2), [u, -3, 3], [v, -2, 2])$
28 #+begin_src maxima :file maxima-test-ouput.out
29 for i:1 thru 10 do print(i)$
33 :ID: b5561c6a-73cd-453a-ba5e-62ad84844de6
35 Simple list as an input
36 #+begin_src maxima :var a=(list 1 2 3) :results silent :results verbatim
40 #+begin_src maxima :var a=(list 1 (list 1 2) 3) :results silent :results verbatim
46 :ID: 400ee228-6b12-44fd-8097-7986f0f0db43
48 #+tblname: test_tbl_col
52 #+tblname: test_tbl_row
55 #+begin_src maxima :var s=test_tbl_col :results silent :results verbatim
59 #+begin_src maxima :var s=test_tbl_row :results silent :results verbatim
64 #+tblname: test_tbl_mtr
67 #+begin_src maxima :var s=test_tbl_mtr :results silent :results verbatim
72 * Construct a table from the output
74 :ID: cc158527-b867-4b1d-8ae0-b8c713a90fd7
76 #+begin_src maxima :var s=test_tbl_mtr :results silent
77 m: genmatrix (lambda([i,j], i+j-1), 3, 3)$
78 write_data(m, "/dev/stdout")$
82 #+begin_src maxima :exports both :results latex :results verbatim
84 tex(ratsimp(diff(%e^(a*x), x)));