Plotting White Noise Distribution in Mathematica

In summary: No, the noise is white noise because each individual number in the noise is uncorrelated with the others.
  • #1
madness
815
70
Does anyone know how to plot noise in mathematica? I want to plot a normal distribution which is white noise in the time domain. This is because I want a constant power spectral density but Gaussian spread of values. Anyway I can plot a list of normal distributed numbers but want to know how to plot them on a graph with white noise distribution.
 
Physics news on Phys.org
  • #2
For a white noise time series based on draws from the standard normal distribution, you might choose to do something like the following.

Code:
w = RandomReal[NormalDistribution[0,1], 500];
ListLinePlot[w]

Is this what you're after?
 
  • #3
Not quite, that plot goes from 0 to 500. I want to inject a signal into the noise, and at the moment I'm having to stretch the signal to a width of 500 (or however many data points I choose).
 
  • #4
The usual tactic one adopts to model a stochastic process containing a deterministic signal is to, well, model a stochastic process containing a deterministic signal. For instance, suppose that you have experimental data that looks like a sinusoidal signal blurred with white noise. You can model such a thing in Mathematica by defining the deterministic and stochastic parts of the signal separately and then adding them.

Code:
sample_length = 1000;
w = RandomReal[NormalDistribution[0, 1], sample_length];
s = Table[2*Cos[t/50] + 0.6 \[Pi], {t, 1, sample_length}];
ListLinePlot[w + s]

http://img697.imageshack.us/img697/3527/signals.png

You can of course adapt this idea to whatever you're looking at simply by changing the number of steps in the stochastic process you're generating.
 
Last edited by a moderator:
  • #5
With this method you define 1000 random numbers and insert them at unit intervals for the noise. Does this mean the noise is white noise since the numbers are uncorrellated at each point in time? Or does the fact that the noise is there at every sample point count as a correlation?
 

Related to Plotting White Noise Distribution in Mathematica

1. What is the purpose of plotting noise in Mathematica?

Plotting noise in Mathematica allows for the visualization of random or noisy data, which can help identify patterns or trends that may not be visible in raw data. It is a useful tool for data analysis and exploration.

2. How do I generate and plot noise in Mathematica?

To generate and plot noise in Mathematica, you can use the built-in functions such as RandomReal or RandomFunction. These functions allow you to specify the type and distribution of noise to be generated. You can then use the ListPlot or Plot functions to visualize the data.

3. Can noise be added to existing data in Mathematica?

Yes, you can add noise to existing data in Mathematica using the AddNoise function. This function allows you to specify the amount and type of noise to be added to the data.

4. How can I customize the appearance of my noise plot in Mathematica?

There are various options available in Mathematica for customizing the appearance of your noise plot. You can change the color, style, and size of the data points and lines using the PlotStyle option. You can also add labels, legends, and other annotations using functions such as PlotLabel and PlotLegends.

5. Is there a way to export a noise plot from Mathematica?

Yes, you can export a noise plot from Mathematica in various formats such as image files (PNG, JPEG, etc.), vector graphics (PDF, SVG, etc.), and data files (CSV, TXT, etc.). You can use the Export function and specify the desired format to save your plot.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
696
  • General Discussion
Replies
2
Views
569
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • High Energy, Nuclear, Particle Physics
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
Back
Top