What is the reason for the difference in results?

let x = [1 2 3;4 5 6], then why norm(x,2)is different fromnorm(x(:),2)

norm(x,2) = 9.5080and norm(x(:),2)=9.5394.

I launched this program in Matlab R2012a.

+5
source share
2 answers

As defined in Matlab's help for the norm, the return value is the “largest singular value” for matrices and sum(abs(A).^2)^(1/2)for vectors.

Additional reading: wikipedia - matrix norm

+5
source

x(:) - , ., Matlab, . x - . 2- 2- -, 2- 2- . . .

2- ? , , , SO, .

+3

All Articles