]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - maxima/maxima-init.mac
maxima: Add norm() which calculates the euclid norm.
[config/dotfiles.git] / maxima / maxima-init.mac
index df7c66bd91fde1ccfdfaee832b4e949c4fe38594..045a2586be08dff3851728548d820e038fd79304 100644 (file)
@@ -13,6 +13,9 @@ load (descriptive);
 
 /* CUSTOM FUNCTIONS */
 
+/* Didn't find any euclid norm in Maxima, so here it is. */
+norm(x) := sqrt(transpose(x) . x);
+
 /* Maxima's norm() can't calculate the 2-norm. Only works for non-complex
  * matrices. */
 norm_2(x) := sqrt(maxi(eigenvalues(transpose(x) . x)[1]));