Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ programming You should include your source code for the questions Clearly label your question numbers onto your answer template. Task 1 60 Marks total.

image text in transcribed

C++ programming

You should include your source code for the questions Clearly label your question numbers onto your answer template. Task 1 60 Marks total. Writing a program that generates an accurate output- 48 marks. Analysis of the problem -i.e. data requirements- 6 marks. Good programming practice-ie proper use of remarks and structuring of the program modules- 6 marks] This task is to simulate signal filtering using a moving average method. A. [10 marks] Generate a sine wave that has a frequencyf lHz in [0 10 seconds] time interval with time steps of 10ms. The generated values should be stored in an array of doubles called S S[i]-sin(2nft) B. [10 marks] Generate random values having the same number of points as the signal in the previous question. The random values should be between -0.1 and 0.1. Store the randorm values in an array of doubles called N N[i]random values between (-0.1 and 0.1) These random values represent a random noise that could be added to the signal S C. [10 marks] Create an array that contains the sum of the signal in S and noise in N D. 10 marks] Save the resulting array on disk as a binary file. E. [5 marks] Open the binary file you created in the previous question and read it. Insert the content of the file in a new array B [15 marks] Generate a filtered version of A using the moving average method. The moving average method operates by averaging a number of points from the input signal to produce each point in the output signal. The equation is shown below: F. i+p/2 Aln] ni-p/2 F is the filtered signal, A is the noisy input signal, p is the number of points to use. Suppose that p 10. The equation becomes: Fli] For each question in this task, first provide the analysis of the problem by clarifying the inputs, outputs and the data requirements. Then write the program and submit the source code as part of the assignment. It is important to clearly structure your program by using indentation and comments to clarify your ideas

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What ideas from this tool can be implemented at your workplace?

Answered: 1 week ago