Explore BrainMass

Explore BrainMass

    Matlab plot of the spectrum of the signal

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Create a simple low-pass filter consisting of 10 1's in a row
    lpf = ones(1,10)

    Plot the spectrum of the signal using the command:
    plot(abs(fft([lpf zeros(1,246)])));

    Indicate the frequency of the first zero in the frequency response in terms of the sampling frequency (frequency(bin#) = (bin#-1)*fs/(N_bins)

    © BrainMass Inc. brainmass.com December 24, 2021, 5:55 pm ad1c9bdddf
    https://brainmass.com/math/discrete-math/matlab-plot-spectrum-signal-79893

    Attachments

    SOLUTION This solution is FREE courtesy of BrainMass!

    Please see the attached file for Matlab codes and plots.

    Create a simple low-pass filter consisting of 10 1's in a row
    lpf = ones(1,10)

    Plot the spectrum of the signal using the command:
    plot(abs(fft([lpf zeros(1,246)])));

    Indicate the frequency of the first zero in the frequency response in terms of the sampling frequency (frequency(bin#) = (bin#-1)*fs/(N_bins)

    Matlab:
    lpf = ones(1,10);
    y=abs(fft([lpf zeros(1,246)]));
    plot(y);
    title('Frequency response of LPF');
    %find the bin# of first zero in the freq response
    bin=find(y==0);

    bin =

    129
    N_bins=256; %since you patched 246 zeros to 10 1s.
    For the data, period T=10; fs=1/T=0.1;
    frequency of the first zero in the frequency response in terms of the sampling
    (129-1)*fs/256=0.5fs=0.05

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    © BrainMass Inc. brainmass.com December 24, 2021, 5:55 pm ad1c9bdddf>
    https://brainmass.com/math/discrete-math/matlab-plot-spectrum-signal-79893

    Attachments

    ADVERTISEMENT