org-mode/testing/examples/ob-maxima-test.org
Nicolas Goaziou 9e8c968bff Replace TBLNAME with NAME in tests
* testing/examples/ob-C-test.org:
* testing/examples/ob-fortran-test.org:
* testing/examples/ob-maxima-test.org:
* testing/lisp/test-ob-python.el (test-ob-python/colnames-yes-header-argument-again):
(test-ob-python/colnames-no-header-argument-again):
* testing/lisp/test-ob.el (test-ob/do-not-resolve-to-partial-names-data):
  Use NAME instead of TBLNAME.

TBLNAME is deprecated syntax since Org 8.
2016-02-10 15:40:11 +01:00

2 KiB

a collection of examples for ob-maxima tests

Simple tests

print(s);

Pass a string

print(diff(fun, x, q))$

Graphic output

Graphic output

plot2d(sin(a*x), [x, 0, 2*%pi])$
plot3d (2^(-u^2 + v^2), [u, -3, 3], [v, -2, 2])$

Output to a file

Output to a file

for i:1 thru 10 do print(i)$

List input

Simple list as an input

print(a)$
print(a+1);

Table input

1.0
2.0
1.0 2.0
print(s+1.0);
print(s+1.0);

Matrix

1.0 1.0
ms: apply(matrix, s);
print(ms);

Construct a table from the output

m: genmatrix (lambda([i,j], i+j-1), 3, 3)$
write_data(m, "/dev/stdout")$

Latex output

assume(x>0);
tex(ratsimp(diff(%e^(a*x), x)));

$$a\,e^{a\,x}$$