Using SOLVE with integration which has no explicit solution
Afficher commentaires plus anciens
Using the symbolic toolbox(Matlab R2012a), I want to solve for the root of f(y)=0. In the example below, the answer should be y=0. However, if I run the following codes, I get errors indicated further below. It seems that the integration with no explicit solution is causing the problem. I would appreciate any ideas for fixing this problem. Thanks.
-------------------------------
syms x y
f = y - int(exp(-(log(x))^2)*(y + y/x), x, 0.1, 1);
solve(f, y)
---------------------------------
Error using mupadengine/feval (line 157) MuPAD error: Error: Second argument must be either of form x or x=a..b. [int]
Error in solve (line 160) sol = eng.feval('symobj::solvefull',eqns,vars);
2 commentaires
Walter Roberson
le 20 Avr 2014
f = -(1/2)*y*(sqrt(Pi)*exp(1/4)*erf(ln(2)+ln(5)+1/2)-sqrt(Pi)*exp(1/4)*erf(1/2)+sqrt(Pi)*erf(ln(2)+ln(5))-2)
and solve(f,y) gives y = 0
Walter Roberson
le 20 Avr 2014
The error message suggests the possibility that in your actual code, you have given "y" a value.
Réponses (0)
Catégories
En savoir plus sur Code Performance dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!