Error in muPAD command

6 次查看(过去 30 天)
F Mehr
F Mehr 2014-4-20
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.

回答(1 个)

Walter Roberson
Walter Roberson 2014-4-20
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.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by