Matlab provides vector and matrix norms, and the norm function calculates several different types of matrix norms. The matrix norm is a scalar, which gives some measure of the magnitude of the matrix elements. The norm function calculates several different types of matrix norms:
n = norm(A) returns the largest singular value of A, max(svd(A)).
Now inf is The infinity norm or largest row sum of A as max(sum(abs(A')))
Note that norm(A) , where A is the vector of n-elements, is the length of A, since you can also find the root-mean-square (RMS) value from norm(A)/sqrt(n)
Note that the norm (x) is the Euclidean length of the vector x. MATLAB, on the other hand, uses length to indicate the number of elements n in a vector. This example uses norm (x) / sqrt (n) to get the rms value (RMS) of the n-element vector x. As an example
x = [0 1 2 3] x = 0 1 2 3 sqrt(0+1+4+9) % Euclidean length ans = 3.7417 norm(x) ans = 3.7417 n = length(x) % Number of elements n = 4 rms = 3.7417/2 % rms = norm(x)/sqrt(n) rms = 1.8708
Freak source share