From f87a6876f08d7704d17345ea5dbed7cb77887aea Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 23 Jun 2011 16:49:29 +0200 Subject: [PATCH] maxima: Add norm() which calculates the euclid norm. --- maxima/maxima-init.mac | 3 +++ 1 file changed, 3 insertions(+) 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])); -- 2.45.2