>> Remember that not all 2-dimensional arrays represent linear operators.

That's another can of worms.  For that matter, not all linear operators
are represented by 2-dimensional arrays.   Sorting this out is a topic
for another day.


For now, I think if your A is really A[:] in your mind (i.e. it's a vector)
then perhaps to be self-honest  you should type norm(A[:])  and not
normfro(A)  though they compute the same thing, and the end it doesn't
matter.


 Regarding @karpinski  , I was just brining up the issue of
Schatten norms.  http://en.wikipedia.org/wiki/Schatten_norm
which points out that the p-norm of svdvals(A) is a norm.

Thus the 2-norm of svdvals(A) is normfro(A)
and the infinity norm of svdvals(A) is norm(A) , the matrix 2-norm.

Regarding what to propose:

I'm sure people do everything, but in my experience people
just use norm and normfro on matrices (maybe sometimes
the matrix 1 and infinity norms, but not so much)

and they use the 0,1,2, and infinity norms on vectors
(note p<1 is not a norm, but the concept still makes sense
and the 0 norm is like nnz,used to measure sparsity)






On Wed, Mar 5, 2014 at 8:58 PM, Steven G. Johnson <[email protected]>wrote:

>
>
> On Wednesday, March 5, 2014 8:00:32 AM UTC-5, Alan Edelman wrote:
>
>> >> (It's a perfectly good norm to treat an MxN matrix as a length MN
>> vector and apply one of the vector norms to it.)
>> I sort of disagree with that culturally.  I don't think one should be
>> able to type vecnorm of a matrix
>> rather one should do norm(A[:])
>>
>
> Remember that not all 2-dimensional arrays represent linear operators.
> For example, a 2d array could represent the solution of a 2d PDE on a 2d
> finite-difference grid, in which case the desired norms are usually vector
> norms.   It's good to support this functionality without making a copy of
> the array via A[:], not to mention supporting 3d arrays and other
> collection types.
>
> (Technically, you could avoid the copy with reshape(A, length(A)), and in
> the future A[:] may do this implicitly.  But that will only work for the
> Array type -- costless reshaping will not generally be available for other
> AbstractArray subtypes.)
>

Reply via email to