第1个回答 2013-08-23
其实如果想知道matlab中函数的作用,最好是help一下~,慢慢的你会发现它很强大的。help一下呗,事实证明你的确信是错的help absABS Absolute value. ABS(X) is the absolute value of the elements of X. When X is complex, ABS(X) is the complex modulus (magnitude) of the elements of X.这个就是它的作用,简单说就是求绝对值,比如ABS(-1) = 1,ABS(2) = 2。
第2个回答 2013-08-24
呵呵,其实如果想知道matlab中函数的作用,最好是help一下~,慢慢的你会发现它很强大的。help一下呗,事实证明你的确信是错的help absABS Absolute value. ABS(X) is the absolute value of the elements of X. When X is complex, ABS(X) is the complex modulus (magnitude) of the elements of X.这个就是它的作用,简单说就是求绝对值,比如ABS(-1) = 1,ABS(2) = 2。本回答被提问者采纳
第4个回答 2016-05-19
matlab中abs(x)表示对x中的元素求绝对值,当x为复数时,表示该复数的幅值。
举例如下:
1、
>> abs(-3)
ans =
3
-3的绝对值为3
2、
>> abs([2,4,-5,-8,0-1])
ans =
2 4 5 8 1
求出每个元素的绝对值
3、
>> abs(2+i)
ans =
2.2361
求复数的幅值