范数求解

来源:互联网 发布:游戏编程常用算法 编辑:程序博客网 时间:2024/06/05 04:07
2范数
     NORM(X) is the 2-norm of X.  %2范数
     NORM(X,2) is the same as NORM(X).
1范数:
     NORM(X,1) is the 1-norm of X.
无穷范数:
     NORM(X,inf) is the infinity norm of X.
     NORM(X,'fro') is the Frobenius norm of 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)).

最常用的范数就是p-范数。若x=[x1,x2,...,xn]^T,那么 
  ║x║p=(|x1|^p+|x2|^p+...+|xn|^p)^{1/p} 
  可以验证p-范数确实满足范数的定义。其中三角不等式的证明不是平凡的,这个结论通常称为闵可夫斯基(Minkowski)不等式。 
  当p取1,2,∞的时候分别是以下几种最简单的情形: 
  1-范数:║x║1=│x1│+│x2│+…+│xn│ 
  2-范数:║x║2=(│x1│^2+│x2│^2+…+│xn│^2)^1/2 
  ∞-范数:║x║∞=max(│x1│,│x2│,…,│xn│) 
0 0
原创粉丝点击