Operator '+' is not supported for operands of type 'function_handle'.
6 views (last 30 days)
Show older comments
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 Comments
Answers (2)
埃博拉酱
on 26 Jun 2023
Only symbolic functions can be added directly. You may need to refer to Symbolic Math Toolbox.
0 Comments
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!