Unable to plot a wavefunction

1 回表示 (過去 30 日間)
Sergio Manzetti
Sergio Manzetti 2018 年 1 月 3 日
コメント済み: Sergio Manzetti 2018 年 1 月 4 日
Hi, I wonder if any of you can try to plot this and see if they also get a weird bar?
syms h g x C t m e p c
h = 1.0545718E-34
g = 5.344285879E-28
E = 1
Z = - (exp(-(x*(g*1i + (- 2*g^2 + E)^(1/2)))/h)*(g*1i - (- 2*g^2 + E)^(1/2)))/(2*(E - 2*g^2)^(1/2)) + (exp(-(x*(g*1i - (- 2*g^2 + E)^(1/2)))/h)*(g*1i + (- 2*g^2 + E)^(1/2)))/(2*(E - 2*g^2)^(1/2))
fplot(real(Z), [ -4, 4 ])
figure(1)
Thanks!
If so, why?

採用された回答

David Goodmanson
David Goodmanson 2018 年 1 月 4 日
Hi Sergio,
This function appears to have scaling issues. If you plot
figure(1)
fplot(real(Z), [-2*h, 2*h])
figure(21)
fplot(imag(Z), [-2*h, 2*h])
you can see the function. I believe this addresses the question, but there are other things going on too. Possibly you were using E=1 just for test purposes, but compared to that value, 2*g^2 is infinitesimal. Also the function itself is an increasing exponential which is not good for a wave function unless there is some kind of hard boundary.
  1 件のコメント
Sergio Manzetti
Sergio Manzetti 2018 年 1 月 4 日
Thanks David, this is excellent! Indeed E=1 was set to test. I will try this out as you suggest! Best wishes

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by