Error in muPAD command
Afficher commentaires plus anciens
please help me about this error :
??? Error using ==> mupadmex
Error in MuPAD command: DOUBLE cannot convert the input expression into a double array.
If the input expression contains a symbolic variable, use the VPA function instead.
This error appears for this code calculating Y1.
for beta = 1:2
syms zbar
zbarc = double(int((((70e9-427e9)*(zbar/0.1*(2e-9))^beta+427e9)/(1-((0.3-0.17)*(zbar/0.1*(2e-9))^beta+0.17)^2))*zbar, 0, 0.1*(2e-9))/(int((((70e9-427e9)*(zbar/0.1*(2e-9))^beta+427e9)/(1-((0.3-0.17)*(zbar/0.1*(2e-9))^beta+0.17)^2)), 0, 0.1*(2e-9))));
Y1 = double(int ((((70e9-427e9)*(zbar/0.1*(2e-9))^beta+427e9)/(1-((0.3-0.17)*(zbar/0.1*(2e-9))^beta+0.17)^2)).*(zbar-zbarc),0,0.1*(2e-9)));
end
Thank you.
Réponses (1)
Walter Roberson
le 20 Avr 2014
0 votes
You could get that error if int() is not able to find a closed form solution for the integral, and numeric integration also finds itself not able to come up with a solution (e.g., if it diverges). In that combination of circumstances, conversion to floating point form would fail.
Catégories
En savoir plus sur Conversion 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!