how do i use sqrt when trying to code a math function
5 次查看(过去 30 天)
显示 更早的评论
im trying to code:
sqrt(100^2+(.01x-(100/x))^2)
but i keep getting the invalid expression error.
0 个评论
回答(1 个)
Walter Roberson
2023-2-21
sqrt(100^2+(.01x-(100/x))^2)
^^
MATLAB has absolutely no implied multiplication. .01x is a syntax error, not 0.01 times x.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fixed-Point Code Generation in MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!