Question: Write a MATLAB code using a while loop that splits the signal x in non-overlapping segments of length 100. Place each segment in a MATLAB

Write a MATLAB code using a while loop that splits the signal x in non-overlapping segments of length 100. Place each segment in a MATLAB cell. For each segment, s{1}, s{2}, etc, use the absolute value of the fft, i.e., abs(fft(s{i})), for the i-th segment, to find out where the maximum peak is located. You can use the command find for this purpose as follows w = find(abs(fft(s{i}))==max(s{i})); This piece of code will return a vector w which contains the location where the peak is found. Remember that the absolute value of the fft will contain peaks symmetrically located around the center. Therefore, you need to keep only the first location, i.e., w(1). Using w(1), determine the frequency of the cosine in segment s{i}

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!