HOw to convert a variable to positive irrespictive of previous ?
1 回表示 (過去 30 日間)
古いコメントを表示
Shubham Mohan Tatpalliwar
2018 年 10 月 17 日
編集済み: madhan ravi
2018 年 10 月 17 日
A=-3
B= 2
C= 4
D= A+B+C
D=9
As i am working on a loop A or B or C can be negative or positive but i have to put these in D as a positive value only
0 件のコメント
採用された回答
madhan ravi
2018 年 10 月 17 日
編集済み: madhan ravi
2018 年 10 月 17 日
abs() %gives you positive always which refers to absolute value
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!