Error: Undefined operator '+' for input arguments of type 'function_handle'
Show older comments
Here is my code;
function z = joy(t,z)
joymin = @(x) 150 - x;
joyadd = @(z) z;
z = integral2(@(x,y) normpdf(x,100,10).*normpdf(y,200,10),t,inf,joymin + joyadd,inf);
end
When I try to run joy(100,10), I get an error saying Undefined operator '+' for input arguments of type 'function_handle'.
The problem comes from joyadd because the code runs smoothly if I remove it.
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices 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!