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

3 ビュー (過去 30 日間)
takgqat
takgqat 2023 年 5 月 22 日
回答済み: bpdytxs 2023 年 5 月 22 日
[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处的频率。
问题:得不到我要的结果图

採用された回答

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEncryption / Cryptography についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!