Question: function hClean = clean(hIn) end Example: hClean=clean(sampleSignal()); Error=sqrt(sum((hClean-signal(10,0).^2)/1024)); disp('If ok, the error should be machine error, about 10^{-16} or smaller') disp('Error = ',[num2str(Error)]) A signal

 function hClean = clean(hIn) end Example: hClean=clean(sampleSignal()); Error=sqrt(sum((hClean-signal(10,0).^2)/1024)); disp('If ok, the

error should be machine error, about 10^{-16} or smaller') disp('Error = ',[num2str(Error)])

function hClean = clean(hIn)

end

Example:

hClean=clean(sampleSignal());

Error=sqrt(sum((hClean-signal(10,0).^2)/1024));

disp('If ok, the error should be machine error, about 10^{-16} or smaller')

disp('Error = ',[num2str(Error)])

A signal generator is expected to output a pure sinusoidal signal at a given frequency. Unfortunately, due to some subpar components in the electronics, the signal is contaminated by white noise over a range of frequencies. Fortunately, the noise does not impact the desired frequency. If hOut is the discretized output of the generator, write a Matlab function hClean = clean (h0ut) that removes the noise without affecting the signal. To help you with the problem, I have provided a p code for a function hOut = sampleSignal () that provides an example of the type of signal that needs to be cleaned. This is an example. Your cleaning function will be evaluated with signals that may have different target frequencies and/or noise intensity and range so it cannot not assume that the signal is at a given frequency. What you can assume is that the intensity of signal to noise ratio is the same as in the example provided. Figure 1 shows the noisy and the clean signal. Figure 1. Example of Noise and clean signal

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!