if function for array

1 回表示 (過去 30 日間)
Chihiro Omori
Chihiro Omori 2019 年 4 月 12 日
回答済み: madhan ravi 2019 年 4 月 12 日
A = [1,-3, 7; -4, -16, 2 ;3, 2,-10]
If there are numbers<0, I would like to change the minus to plus by using 'IF' statement.
The result I want is A = [1,3,7; 4,16 2; 3, 2, 10].

採用された回答

madhan ravi
madhan ravi 2019 年 4 月 12 日
abs(A)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics and Optimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by