求助!Matlab中解带参数,带积分的方程
我是新手,但最近做的课题需要用matlab算东西。据说matlab很强大,但其中很多功能和函数我不太会用,虽然一直关注帖子,但缺少交流和指点,自己搞实在搞不出来,特来求教各位大牛。n_0=2.7e19;
l=0.025;
t=0.82;
Roc=0.3;
T=110+273;lambda_D2=852.3e-9;
c=3e8;P_p=0.774;
n_He_amagat=0.587;
tao_2=30.5e-9;
Gamma_D2_He=19.3e9*sqrt(T/294);
Delta_2=1/(2*pi*tao_2);
Delta_2He=Gamma_D2_He*n_He_amagat;
sigma_2=2.31e-13;
sigma_2He=Delta_2*sigma_2/Delta_2He;
k=1.38e-23;
m_cs=132.9e-3/6.02e23;
m_ethane=30e-3/6.02e23;
n_ethane=3.324e24;
sigma_pp=5.2e-19;
vr=sqrt(3*k*T*(1/m_cs+1/m_ethane));
gamma=n_ethane*sigma_pp*vr;
tao_1=34.9e-9;
Gamma_D1_He=21.5e9*sqrt(T/294);
Delta_1=1/(2*pi*tao_1);
Delta_1He=Gamma_D1_He*n_He_amagat;
sigma_1=1.53e-13;
sigma_1He=Delta_1*sigma_1/Delta_1He;
l=0.025;R_P=1;
eta_mode=0.9245;
eta_del=0.9;
omega_L=262.5e-6; V_L=0.5*l*pi*omega_L^2;
h=6.63e-34;
q=exp(-1102/(1.38*T)); syms n_3;
format long
n_1 = 0.5 * ( (n_0-n_3) - (1/(2*sigma_1He*l)) * log(1/(t^2 * Roc)) );
Delta=Delta_2He./sqrt(log(2));
y=@(x) (2./(1.553132120584575e+10.*1.77).*exp(-4.*(x-3.52e14).^2./(1.553132120584575e+10.^2))./(6.63e-34.*x)).*(1-exp(-(',num2str(n_1),'-0.5.*',nim2str(n_3),').*9.322043821509133e-17./(1+((x-3.52e14).*2./1.293067308729821e+10).^2).*0.025)).*(1+1.*exp(-(',num2str(n_1),'-0.5.*',nim2str(n_3),').*9.322043821509133e-17./(1+((x-3.52e14).*2./1.293067308729821e+10).^2).*0.025));
z=quadv(y,3.51906158e14,3.5207135e14);
output =@(n_3) eta_mode.*eta_del.*z.*P_p./V_L-(gamma*(n_3 - q*(n_0-n_3+(1/(2*sigma_1He*l)*log(1/(t^2*Roc)) ) )) + n_3/tao_2);
option=optimset('Algorithm','Levenberg-Marquardt');
sol=double(fsolve(output,3.7960884192466376e18,option))
本来y=的那个式子里有很多参数,就是程序开始输入的常数,我怕积分时不能带参数,后来就全换成常数了。最关键的是下面解的那个方程,其中n_3是未知数。我不知道应该用solve\fzero\fsolve,但我都试过了,不行,而且fsolve对初值要求较高。特来求大牛帮忙看看下面的关于积分和解方程的东西应该怎么办?
%y=(2./(Delta.*sqrt(pi)).*exp(-4.*(x-c./lambda_D2).^2./(Delta.^2))./(h.*x)).*(1-exp(-(n_1-0.5.*n_3).*sigma_2He./(1+((x-c./lambda_D2).*2./Delta_2He).^2).*l)).*(1+R_P.*exp(-(n_1-0.5.*n_3).*sigma_2He./(1+((x-c./lambda_D2).*2./Delta_2He).^2).*l));这是y=那个式子带参数的时候的样子,里面的参数都是常数,除了n_3,n_1.
页:
[1]