Error in muPAD command
3 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Walter Roberson
on 20 Apr 2014
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.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!