Subject: Strange Frobenius norm of a certain matrix
From: Barton Willis
Date: Sun, 23 Sep 2007 18:52:55 -0500
Yes, the code for the Frobenius norm is missing a square root.
I'll fix this; till then use
mat_norm(m, p) := block([listarith : true, d],
require_matrix(m,"first","mat_norm"),
if blockmatrixp(m) then m : mat_fullunblocker(m),
if p = 1 then mat_norm(transpose(m), 'inf)
else if p = 'inf then (
d : 0,
for ri in m do (
d : max(d, tree_reduce("+", map('cabs, ri)))),
d)
else if p = 'frobenius then sqrt(tree_reduce("+", lreduce('append,
args(cabs(m)^2))))
else error("Not able to compute the ",p," norm"));
Thanks for the report.
BW
-----maxima-bounces at math.utexas.edu wrote: -----
>To: maxima at math.utexas.edu
>From: "Paul Smith" <phhs80 at gmail.com>
>Sent by: maxima-bounces at math.utexas.edu
>Date: 09/23/2007 03:54PM
>Subject: Strange Frobenius norm of a certain matrix
>
>Dear All,
>
>Consider the following code:
>
>(%i1) A:matrix([1,1],[1,1]);
> [ 1 1 ]
>(%o1) [ ]
> [ 1 1 ]
>(%i2) mat_norm(A,frobenius);
>(%o2) 4
>(%i3)
>
>Should not the Frobenius norm of this matrix be equal to 2?
>
>Thanks in advance,
>
>Paul
>_______________________________________________
>Maxima mailing list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima