Unable to convert expression into double array
Mostra commenti meno recenti
When I run my code, I keep getting this error: "The following error occurred converting from sym to double: Unable to convert expression into double array."
r=50;
d=50;
a=12.61;
syms x
syms y
J=(besselj(0,x*y*a/d))*((1-y^2)^0.5)*y;
B1=int(J, y, [0 1]);
E1=zeros(1,301);
t=0:0.1:30;
for i=1:301
B=B1*besselj(0,x*r/d)*((x*tanh(x))^0.5)*sin((((9.81/d*t(i)^2)*x)*tanh(x))^0.5)*x;
E1(i)=vpaintegral(B, x, [0 2000])
end
Risposta accettata
Più risposte (1)
Bo Zhang
il 18 Nov 2020
1 voto
thanks
Categorie
Scopri di più su Conversion Between Symbolic and Numeric in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!