How do you express this function in MATLAB syntax ?
3 次查看(过去 30 天)
显示 更早的评论
𝑓(𝑥) = e^x + sin(5x)
How do you express this function in MATLAB syntax ?
0 个评论
采纳的回答
KSSV
2020-6-9
编辑:KSSV
2020-6-9
f = exp(x)+sin(5*x) ; % define x before
f = @(x) exp(x)+sin(5*x) ; % call by f(value) This is called Anonymous function
5 个评论
Walter Roberson
2020-6-9
f = exp(x)+sin(5*x) ;
would be an error if you had not defined x before.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!