Need to solve an singlevariable integral of functions of two variables, and get answers as functions
1 view (last 30 days)
Show older comments
Hello and thanks
I've done this before, but now am getting an error like
Error using integralCalc/finalInputChecks (line 522)
Input function must return 'double' or 'single' values. Found 'sym'.
Error in integralCalc/iterateScalarValued (line 315)
finalInputChecks(x,fx);
Error in integralCalc/vadapt (line 132)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 103)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval);
when doing
Sol_Mex_P_22 = @(J) abs(integral(@(t) K_mex_p(t).*CC22(t,J),-Inf,Inf));
what is wrong??
thanks!
0 Comments
Answers (1)
Matt J
on 6 May 2020
This function
@(t) K_mex_p(t).*CC22(t,J)
needs to return a numeric value for every given t. It is returning a symbolic value, however.
2 Comments
Matt J
on 6 May 2020
No, the failure here is because CC22 is a symbolic expression or a symbolic value for J was given as input. All variables participating in this computation must be non-symbolic. If you need to do symbolic integration, then you would use int,
See Also
Categories
Find more on Calculus 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!