Error in inline expression
显示 更早的评论
>> f=inline('8 abs(9 cos^(-1)(3 - h/3) - (3 - h) sqrt(6 h - h^2))-100','h');
% Invalid expression what is wrong
1 个评论
Stephen23
2022-3-13
I lost count of the syntactical errors.
But the most important question is: why are you using deprecated INLINE?
回答(1 个)
Torsten
2022-3-13
f = @(h) 8*abs(9*acos(3 - h/3) - (3 - h).*sqrt(6*h - h.^2)) - 100
or
f = @(h) 8*abs(9./cos(3 - h/3) - (3 - h).*sqrt(6*h - h.^2)) - 100
depending on what you mean by cos^(-1)
类别
在 帮助中心 和 File Exchange 中查找有关 Function Creation 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!