/* * Maxima (computer algebra system) configuration file, maxima part. * * Also have a look at maxima/maxima-init.mac. */ /* CUSTOM FUNCTIONS */ /* Didn't find any euclid norm in Maxima, so here it is. */ norm(x) := sqrt(transpose(x) . x); /* Maxima's mat_norm() can't calculate the 2-norm. Thanks to Wolfgang Lindner * (http://www.ma.utexas.edu/pipermail/maxima/2007/006300.html) for an * improved version. */ mat_norm2(x) := sqrt(lmax(eigenvalues(transpose(conjugate(x)).x)[1])); /* Shortcut to perform lu factorization. */ lu(x) := block(x : lu_factor(x), get_lu_factors(x)); /* vim: ft=maxima */