From: Simon Ruderich Date: Thu, 23 Jun 2011 14:49:29 +0000 (+0200) Subject: maxima: Add norm() which calculates the euclid norm. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=f87a6876f08d7704d17345ea5dbed7cb77887aea;p=config%2Fdotfiles.git maxima: Add norm() which calculates the euclid norm. --- diff --git a/maxima/maxima-init.mac b/maxima/maxima-init.mac index df7c66b..045a258 100644 --- a/maxima/maxima-init.mac +++ b/maxima/maxima-init.mac @@ -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]));