Question
Simulate an sine square wave using Java. The simulation time is ten milliseconds.To add noise to the signal, The program should prompt the user to
Simulate an sine square wave using Java. The simulation time is ten milliseconds.To add noise to the signal, The program should prompt the user to enter the noise as an percentage. To generate the random numbers 0 to 1, use the The NextGuassain() function. The function needs to be scaled to a new range of positive and negative noise percentage (e.g.; -10% to +10%). The following equation needs to beused in the program:
Noise_amount = Noise_percent*( -1+2*NextGuassain() ) The noisy data in the program is obtained as follows: Noisy_data = Clean_data + Noise_amount
Afterwards, the program needs simulate an hub/switch to filter out the noise from the signal. This could be easily accomplished by an "If" statement. For example, if the value of the noise data is greater than one or greater than 0.51 then the filtered data is set to 1; otherwise, the value is set to 0. The program should output the clean data, noisy data, and the filtered data into a text file in form of 3 columns for a given noise percentage. Please document the program, Thanks.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started