]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - maxima/maxima-init.mac
maxima: Add function lu() as short for lu factorization.
[config/dotfiles.git] / maxima / maxima-init.mac
1 /*
2  * Maxima (computer algebra system) configuration file, maxima part.
3  *
4  * Also have a look at maxima/maxima-init.mac.
5  */
6
7
8 /* PACKAGES */
9
10 /* Provides maxi() and mini() (and more). */
11 load (descriptive);
12
13
14 /* CUSTOM FUNCTIONS */
15
16 /* Maxima's norm() can't calculate the 2-norm. Only works for non-complex
17  * matrices. */
18 norm_2(x) := sqrt(maxi(eigenvalues(transpose(x) . x)[1]));
19
20 /* Shortcut to perform lu factorization. */
21 lu(x) := block(x : lu_factor(x), get_lu_factors(x));
22
23 /* vim: ft=maxima */