How do I plot a time-dependent probability density function on MATLAB?

In summary, the conversation discusses the probability density for a wave function in free space and the task of plotting it on MATLAB. The function is time dependent and the interval for plotting is between -L/2 and L/2. The individual is unsure how to approach plotting as they are not familiar with the exact method. It is suggested to either choose a specific time to show the important characteristics or create an animation.
  • #1
Elekko
17
0

Homework Statement



Given that, in free space the probability density for a wave function (free particle) is [tex]\mid \Psi(x,t)\mid^2=P(x,t)=\frac{\sigma_0}{\mid \alpha \mid^2\sqrt{\pi}}exp(-(\frac{\sigma_0}{\mid \alpha \mid})^4\frac{(x-x_0-p_0t/m)^2}{\sigma_0^2})[/tex]

What is need to be done is to study a wave packet of size [tex]\sigma_0=\frac{L}{10}[/tex] at [tex]x_0=0[/tex] on the interval [tex]-L/2\leq x \leq L/2[/tex]

I need to plot this probability density function on MATLAB.
Since this PDF is time dependent I actually don't know how I should plot it? I know the interval should go between -L/2 and L/2 but how should this depend on time?

The Attempt at a Solution


Should I just create a vector from -L/2 to L/2 and then just have an arbitrary time?
Basically I cannot "visualize" in mind how it should look like before plotting, as I don't know how it exactly has to be done?
 
Physics news on Phys.org
  • #2
That's right - you pick a time that shows the important characteristics of the density function.
It's either that or create an animation.
 

FAQ: How do I plot a time-dependent probability density function on MATLAB?

What is probability density?

Probability density is a concept in statistics that measures the likelihood of an event occurring within a specific range of values. It is represented by a continuous function, where the area under the curve corresponds to the probability of the event occurring within that range.

How is probability density different from probability?

Probability refers to the likelihood of a specific event occurring, while probability density measures the likelihood of an event occurring within a range of values. Probability is represented by a single value, while probability density is represented by a continuous function.

What is the difference between discrete and continuous probability density?

Discrete probability density is used for events that can only take on a finite set of values, such as rolling a dice. Continuous probability density is used for events that can take on an infinite number of values, such as measuring the weight of an object.

How is probability density calculated?

The probability density function is calculated by taking the derivative of the cumulative distribution function. In other words, it is the rate of change of the probability of an event occurring at a specific point.

How is probability density used in real-life applications?

Probability density is used in a variety of fields, including finance, physics, and engineering. It can be used to model and predict outcomes in situations where there is uncertainty, such as stock prices or weather patterns. It is also used in quality control to determine the likelihood of defects occurring in a product.

Back
Top