## Write a function that takes as input a matrix D ∈ R N×2 , Di = (xi , yi), and the period ω and returns a plot showing a fit of the data without noise. Do this by cleaning the noise in the frequency space.

### mathematics

##### Description

1 Exercise

Noise cancellation with Fourier

Consider the data (xi , yi) for i = 1, . . . , N such that xi = x1 + (i − 1)h and

yi = f(xi) + σi ,

where f is a periodic function of period ω and σi are random variables

Write a function that takes as input a matrix D ∈ R N×2 , Di = (xi , yi), and the period ω and returns a plot showing a fit of the data without noise. Do this by cleaning the noise in the frequency space.

Proceeds as follows:

• use fft to retrieve the Fourier sequence associated with the input data,

• remove the spourious frequencies. How many frequencies are you removing? Why?

• reconstruct the initial function using ifft

If only one input is given, consider the difference between xN and x1 to be the period.

Test your code on Homework4 set1.mat, that has period 2π, and Homework4 set2.mat and Homework4 set3.mat, whose period is not given.

Discuss this problem and the result in a report (≤ 1 computer typed page).

2 Exercise

A phone number is converted by a phone into a signal via a method that is based on the Dual Tone Multi-Frequency system. In this system every digit is associated with two frequencies. We will use a simplified version with 1 only one frequency, that can be found in the table below (frequencies are in Hertz)

Ideally the signal is zero when no key is pressed, while for the duration of the key-press the signal is a sine with the frequency provided above. Unfortunately, there is noise in the signal, both during hte key press and inbetween keys. Have a look at the file signal.mat for an example signal. Also zoom in on a piece where a key is pressed to get an idea about of the signal. You can listen to the signal with sound(signal,4096), where 4096 is the sampling rate of the signal. You will notice that not all keys are pressed equally long and also the time between two digits is not uniform. Moreover, the signal is a bit noisy and not all digits have equal amplitude. The challenge is to write a function that extracts the phone number from this signal.

The input variables are a vector with the signal, and the sampling rate. The output is a row vector with the digits of the phone number.

• The first step is to find the pieces in the signal which represent the digits (and to determine the number of digits).

• From the piece of signal representing one digit, the function extracts the frequency using the Fourier transform.

• Finally, the function determines the digit associated with the frequency.

• The combination of these steps leads to the phone number.

## Related Questions in mathematics category

##### Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.