absolute value of negative real numbers

12 ビュー (過去 30 日間)
Mos_bad
Mos_bad 2017 年 10 月 17 日
回答済み: Mos_bad 2017 年 10 月 17 日
why negative real numbers are not allowed for "abs"? for example abs(-1) gives me 'Subscript indices must either be real positive integers or logicals' error

採用された回答

KL
KL 2017 年 10 月 17 日
Probably you've created a variable called abs in the workspace. Try
clear abs
abs(-1)

その他の回答 (1 件)

Mos_bad
Mos_bad 2017 年 10 月 17 日
it worked. thanks.

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by