Error using symengine. Unable to convert expression into double array.
Mostrar comentarios más antiguos
Dear all,
I am going to compute the equation (34), and I write the following program. For equation (32)-(34), the variables are w and t, other parameters are all constants. It appears that when ii=8, I met the following problem. Can anyone hlep me with this? Thanks a lot!


t=0:0.01:4;
%Gaussian signal parameters
u=2;
sigma=0.5;
%Other parameters
x=100*10^(-6);
v=0.5*10^(-3);
D_0=10^(-8);
h=10*10^(-6);
width=20*10^(-6);
D=(1+(8.5*(2*v*h*width)^2)/(210*((D_0)^2)*(h^2+2.4*h*width+width^2)))*D_0;
C_T=0.5;
C_I0=3;
C_I=zeros(1,length(t));
t1=0;
gaussian=C_I0*(1/sqrt(2*pi*sigma^2))*exp(((t-u).^2)/(-2*sigma^2));
syms y w;
f1=(1/(sqrt(2*pi)))*exp((y^2)/(-2));
Q1=int(f1,y,((sigma^2*i*w-u)/(sigma)),Inf);
C_I_s=(C_I0*(exp(-i*w*u))*exp((sigma*w)^2/(-2))*(Q1))*exp(x*(v-sqrt(v^2+4*D*(i*w)))/(2*D));
for ii=1:length(t)
f4=((exp(-i*w*t(ii))*conj(C_I_s)+exp(i*w*t(ii))*C_I_s)/(2*pi));
C_I(ii)=double(vpaintegral(f4, w, 0, Inf));
end
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!