首页 > 其他 > 详细

norm函数的作用,matlab

时间:2014-03-19 07:08:10      阅读:664      评论:0      收藏:0      [点我收藏+]
格式:n=norm(A,p)
功能:norm函数可计算几种不同类型的矩阵范数,根据p的不同可得到不同的范数

以下是Matlab中help norm 的解释

NORM Matrix or vector norm.
For matrices...
NORM(X) is the largest singular value of X, max(svd(X)).
NORM(X,2) is the same as NORM(X).
NORM(X,1) is the 1-norm of X, the largest column sum,
= max(sum(abs(X))).
NORM(X,inf) is the infinity norm of X, the largest row sum,
= max(sum(abs(X‘))).
NORM(X,‘fro‘) is the Frobenius norm, sqrt(sum(diag(X‘*X))).
NORM(X,P) is available for matrix X only if P is 1, 2, inf or ‘fro‘.
For vectors...
NORM(V,P) = sum(abs(V).^P)^(1/P).
NORM(V) = norm(V,2).
NORM(V,inf) = max(abs(V)).
NORM(V,-inf) = min(abs(V)).

1、如果A为矩阵

n=norm(A)

返回A的最大奇异值,即max(svd(A))

n=norm(A,p)

根据p的不同,返回不同的值

p
返回值

1
返回A中最大一列和,即max(sum(abs(A)))

2
返回A的最大奇异值,和n=norm(A)用法一样

inf
返回A中最大一行和,即max(sum(abs(A’)))

‘fro’
A和A‘的积的对角线和的平方根,即sqrt(sum(diag(A‘*A)))

2、如果A为向量

norm(A,p)

回向量A的p范数。即返回 sum(abs(A).^p)^(1/p),对任意 1<p<+∞.

norm(A)

回向量A的2范数,即等价于norm(A,2)。

norm(A,inf)

返回max(abs(A))

norm(A,-inf)

返回min(abs(A))

norm函数的作用,matlab,布布扣,bubuko.com

norm函数的作用,matlab

原文:http://www.cnblogs.com/ling-dian/p/3608465.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!