Matlab中根据方程式画图的问题!。
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
[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]
就是一些公式:


问题:得不到我要的结果图

0 commentaires
Réponse acceptée
bpdytxs
le 22 Mai 2023
众所周知,1飞秒等于1e-15秒。另外,如果你不知道 hold on 是干什么用的,把它删掉,在开头加上 hold off。
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Encryption / Cryptography dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!