Need to solve an singlevariable integral of functions of two variables, and get answers as functions
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Matt J
il 6 Mag 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 Commenti
Matt J
il 6 Mag 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,
Vedere anche
Categorie
Scopri di più su Calculus in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!