看板 MATLAB 關於我們 聯絡資訊
老師叫我們找有限深井的交點,然後應用在量子井 像是這樣的深度 (0.26ev) 然後E<0.26 ----- ------ 1 1 1 1 1---1 程式碼在這 n=1000; ev=linspace(0,-1,n); m=9.1e-31; hbar=1.05e-34; e=1.6e-19; a=5e-9; %ΔEc=(1.83-1.43)*0.65=0.26; v0=0.26*e; for index=1:259; E=ev(index); energy=e*E; q=sqrt(abs(2*m*(abs(v0-abs(energy))/(hbar*hbar)))); da=2*m*v0*a*a/hbar*hbar; y=q*a; tay=sqrt(da-y*y)/y; aa=tan(y); end subplot(1,1,1); plot(E,energy); 但是他一直說我 Imaginary parts of complex X and/or Y arguments ignored 可以拜託幫我看一下嗎? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.120.31.216 ※ 文章網址: http://www.ptt.cc/bbs/MATLAB/M.1418979342.A.D28.html
Rasin: check ur tay 12/21 04:12