Matlab中根据方程式画图的问题!。

3 vues (au cours des 30 derniers jours)
takgqat
takgqat le 22 Mai 2023
[code
t=0:0.001:10;
c=2.998e8;%光速
lamd=5e-7;
omiga=2*pi.*c./lamd;
omiga1=omiga;
omiga2=0.9*omiga;
gam1=0.1*omiga;
gam2=0.01*omiga;
f=0.025*omiga;
a=1i.*omiga1+gam1;
b=1i.*omiga2+gam2;
lamda1=(-a-b-sqrt((a-b).^2-4*f.^2))*0.5;
lamda2=(-a-b+sqrt((a-b).^2-4*f.^2))*0.5;
r1=((a+lamda2)*exp(lamda1.*t)-(a+lamda1)*exp(lamda2.*t))/(lamda2-lamda1);
y=r1.*conj(r1);
SM(:,1)=t;
SM(:,2)=y;
save SM-plasmonic.txt -ascii SM;
plot(SM(:,1),SM(:,2))
xlabel('Time (fs)');
ylabel('Field intensity (a.u.)');
hold on
[/code]
就是一些公式:
其中w是在波长在500 nm处的频率。
问题:得不到我要的结果图

Réponse acceptée

bpdytxs
bpdytxs le 22 Mai 2023
众所周知,1飞秒等于1e-15秒。另外,如果你不知道 hold on 是干什么用的,把它删掉,在开头加上 hold off。

Plus de réponses (0)

Catégories

En savoir plus sur Encryption / Cryptography dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!