Input array, specified as a vector, matrix, or multidimensional array. By convention,vecnormreturnsNaNvalues if the vector being operated on contains aNaNvalue.
Data Types:single|double Complex Number Support:Yes
p—Norm type 2(default) |positive scalar|inf
Norm type, specified as2(默认),一个正标量或inf.
dim—Dimension to operate along 正整数标量
Dimension to operate along, specified as a positive integer scalar. If you do not specify a value, then the default is the first array dimension whose size does not equal 1.
Dimensiondimindicates the dimension whose length reduces to 1. In other words,size(N,dim)is1, while the sizes of all other dimensions remain the same.
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.