MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] 关于Norm函数返回结果的疑问 (https://www.labfans.com/bbs/showthread.php?t=11800)

duxiaoshi 2010-06-25 15:09

关于Norm函数返回结果的疑问
 
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)).
以上的matlab对Norm使用的解释。

我遇到的问题:
V = [
NaN
NaN
-0.0453
0.0369
0.0163
NaN
NaN
NaN
NaN
NaN
0.2416
0.0750
0.0393
NaN
NaN
NaN
]

norm(V,inf)返回的结果是NaN

根据matlab对norm的解释,我使用norm(V,inf)的等价形式max(abs(V)),返回的结果是0.2416,请教哪位高手解答一下,这种情况怎么正确使用norm?

duxiaoshi 2010-06-25 15:10

回复: 关于Norm函数返回结果的疑问
 
测试了一下,当V=
[
0.0199
NaN
0.0151
-0.0036
-0.0303
NaN
-0.0023
-0.0105
NaN
0.2906
0.0723
0.0585
NaN
0.0530
0.0904
]
时,

norm(V,inf) 有返回值,是0.2906。

不明白为什么会出现以上两种不同的情况


所有时间均为北京时间。现在的时间是 12:33

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.