Plotting Complex Wavefunction - Matlab

In summary, the conversation discusses 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 + ... + for a fixed x as a function of t. It is mentioned that the function is a linear combination of a finite number of energy eigenfunctions of the infinite square well and can be represented in terms of its real and imaginary parts or modulus and phase. The individual steps for plotting in Matlab are explained.
  • #1
Nicolaus
73
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
  • #2
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.
 
  • #3
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.
 
  • #4
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))##
 
  • #5
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
 
  • #6
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 kreil

Related to Plotting Complex Wavefunction - Matlab

1. What is a complex wavefunction?

A complex wavefunction is a mathematical representation of a quantum system. It describes the probability amplitude of finding a particle at a particular position in space and time.

2. Why is it important to plot complex wavefunctions?

Plotting complex wavefunctions allows us to visualize the behavior and characteristics of quantum systems. It can help us understand the probability distribution of particles and their interactions with each other.

3. How do I plot a complex wavefunction in Matlab?

To plot a complex wavefunction in Matlab, you will need to use the "plot" function and specify both the real and imaginary components of the wavefunction as separate input arguments. You can also use the "surf" function to create a 3D plot of the wavefunction.

4. Can I plot multiple complex wavefunctions on the same graph?

Yes, you can plot multiple complex wavefunctions on the same graph by using the "hold" function in Matlab. This allows you to plot multiple functions on the same figure without overwriting previous plots.

5. What information can I gather from a plotted complex wavefunction?

From a plotted complex wavefunction, you can gather information about the shape, amplitude, and phase of the wavefunction. You can also identify areas of high and low probability density for finding particles in a quantum system.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
84
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
960
Back
Top