positive number produced from calculation
1 次查看(过去 30 天)
显示 更早的评论
hi,i have a calculation that requires the output to be positive value. example: (|0.33-0.42|)=0.9 i tried using abs, but the result is not 0.9. matlab does not recognize the | symbol.im guessing i used abs wrong. can someone please show me how to do this?
2 个评论
Star Strider
2016-4-9
The problem is that:
result = abs(0.33-0.42)
result =
0.09
What leads you to believe the correct result is 0.9?
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!