Adding Random Noise to a Sine Wave in Mathematica

In summary, the conversation discusses how to graph a real-life wave using 100 numbers that are connected and added to a sinusoidal wave with noise. The suggestion is to use the Mathematica function Sort to arrange the numbers in ascending order and then add them to the sine function outputs. This method was suggested by the professor and the person seeking advice realizes that it is a simple solution.
  • #1
stunner5000pt
1,461
2
For my time series and spectral analysis class i need to graph something like in the attachment. i need to have 100 numbers that are connected like that, and then 'add' them to a sinusiodal wave to create a real life wave - with noise.

How would i do this using mathematica??

I can easily generate a whole bunch of random numbers with ranging values but how would i make it such taht all the numbers are in ascending order and go from 0 to at least 2 pi?

would i use numerous Random[x] and then arrange them (how?) in ascending order??

Please help!

Thank you in advance for your input
 

Attachments

  • noise.JPG
    noise.JPG
    7.1 KB · Views: 396
Physics news on Phys.org
  • #2
any ideas people??

graphing random numbers and then 'joinging' them seems to be a good idea here... is that possible with mathematica though?
 
  • #3
Look up the function Sort.

Sort[Real,{1.13,2.14,1.54,2.61}]

{1.13,1.54,2.14,2.61}
 
  • #4
I have no idea what you mean, ascending order. From what I can tell, there's no correlation between the time and the value, which is rather the definition of a random variable. You're not going to add the random values to the angles going into the sine function -- you're going to add them to the outputs coming from the sine function.

Just compute a table of sine values, one for each point of interest. Next, add a random value to each entry in the table.

- Warren
 
  • #5
chroot said:
I have no idea what you mean, ascending order. From what I can tell, there's no correlation between the time and the value, which is rather the definition of a random variable. You're not going to add the random values to the angles going into the sine function -- you're going to add them to the outputs coming from the sine function.

Just compute a table of sine values, one for each point of interest. Next, add a random value to each entry in the table.

- Warren

now why didnt i think of it that way

in fact tahts what my prof said too

im just silly

thanks a lot :biggrin:
 

What is graphing noise in Mathematica?

Graphing noise in Mathematica refers to the process of visualizing random or stochastic data using various graphs and plots. This is often done to analyze patterns and trends in the data and to understand the underlying distribution of the data.

What types of graphs can be used to visualize noise in Mathematica?

There are several types of graphs that can be used to visualize noise in Mathematica, including line graphs, scatter plots, histograms, and box plots. These graphs can be customized to suit the specific characteristics of the data and to effectively communicate the noise patterns.

How can I generate random noise data in Mathematica?

There are several built-in functions in Mathematica that can be used to generate random noise data, such as RandomReal, RandomInteger, and RandomVariate. These functions allow you to specify the type of distribution, mean, and standard deviation of the data, among other parameters.

What are some common techniques for analyzing noise data in Mathematica?

Some common techniques for analyzing noise data in Mathematica include calculating summary statistics (such as mean, median, and standard deviation), plotting the data using various graphs, and performing statistical tests (such as t-tests or ANOVA) to compare different groups or conditions.

Can I add noise to existing data in Mathematica?

Yes, you can add noise to existing data in Mathematica using the RandomSeed and RandomChoice functions. These functions allow you to add random fluctuations to your data, which can be useful for simulating real-world scenarios or testing the sensitivity of your results to noise.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
415
  • General Math
Replies
22
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
9K
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
502
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
Replies
19
Views
2K
Replies
34
Views
1K
  • Electrical Engineering
Replies
12
Views
2K
Replies
1
Views
885
  • General Engineering
Replies
4
Views
2K
Back
Top