Operator '+' is not supported for operands of type 'function_handle'.
5 次查看(过去 30 天)
显示 更早的评论
I have two function handle,such as g=@(x)x+a,f=@(y)y+b
why not do '+'
h=g+f
for example
for t=1:10
h(0)=g;
h=g+t.*f
end
0 个评论
回答(2 个)
埃博拉酱
2023-6-26
Only symbolic functions can be added directly. You may need to refer to Symbolic Math Toolbox.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!