Plotting Complex Wavefunction - Matlab

Click For Summary

Discussion Overview

The discussion revolves around plotting a complex wavefunction in Matlab, specifically for a linear combination of finite energy eigenfunctions of the infinite square well. Participants explore how to represent the wavefunction as a function of time for a fixed position.

Discussion Character

  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about plotting a complex function of the form Ψ(t) involving known eigenvalues and energy terms.
  • Another participant questions whether the "+...+" indicates an infinite series, suggesting that only significant terms should be plotted.
  • A participant clarifies that the "+...+" was not meant to indicate an infinite series but rather other arbitrary terms in a finite linear combination.
  • Discussion includes the representation of the wavefunction as either real and imaginary parts or modulus and phase, leading to different types of plots.
  • One participant seeks guidance on how to plot both real-imaginary and modulus-phase representations in Matlab.
  • A later reply provides Matlab commands to access the real part, imaginary part, modulus, and phase of a complex number.

Areas of Agreement / Disagreement

Participants generally agree on the need to represent the wavefunction in different forms for plotting, but there is no consensus on the implications of the "+...+" notation or the significance of terms in the series.

Contextual Notes

There are limitations regarding the assumptions about the number of terms in the wavefunction and the significance of each term for plotting purposes, which remain unresolved.

Nicolaus
Messages
73
Reaction score
0
Hi,
I am wondering how to plot a complex function of the form:
Ψ(t) = Ansin(n⋅pi⋅x/L)e-iEnt/h + Bnsin(m⋅pi⋅x/L)e-iEmt/h + ... +
where m and n are known eigenvalues of the infinite square well with corresponding energy En, for any particular x? So, this will be a function of solely t.
Any help appreciated,
Thanks.
 
Physics news on Phys.org
Does "+...+" mean infinite series? If yes you can't plot it in a computer, you first have to know which terms have more weight than the others and plot only those significant terms.
 
I should have specified; my intent was not for that to represent an infinite series, but rather other arbitrary terms for a linear combination of a finite number of energy eigenfunctions of the infinite square well.
 
If I get your point correctly, you want to plot your wavefunction for a fixed x as a function of t, and this wavefunction is a linear combination of finite number of eigenfunctions of infinite square well.
Well, the wavefunction is a complex number, hence it can be either written in terms of its real and imaginary parts, or modulus and phase. So, you will have two curves for ##\psi(x,t)##, one for real part ##\textrm{Re}[\psi(x,t)]## and one for imaginary part ##\textrm{Im}[\psi(x,t)]##, if you use real-imaginary representation. If you use modulus-phase, they will be ##|\psi(x,t)|## and ##\textrm{Arg}(\psi(x,t))##
 
Correct. If I want a Re-Im representation, how would I go about plotting that on Matlab? Actually, it would be good to know how to plot both types.
Thanks
 
Given ##Z## a complex number, then its real part, imaginary part, modulus, and phase can be accessed through
Matlab:
real(Z);
imag(z)
abs(Z)
angle(Z)
, respectively.
 
  • Like
Likes   Reactions: kreil

Similar threads

  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K