Question

Please can you solve it using MATLAB.(1) Generate random signals [n] and hn, each of length N, and measure the time it takes to compute the linear convolution of

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. Generate random signals first:

x = rand(N,1);

h = rand(N,1);

% Start timer while computing convolution

tic;

clin = conv(x,h); % Linear convolution

toc; % Time taken for Linear convolution

tic;

  x1 = [x zeros(1,N-1)];

h1 = [y zeros(1,N-1)];

conv_fft = ifft(fft(x1).*fft(h1)); % Convolution using FFT

toc;

% Plot required graphs.

plot(clin(10000:10000:100000)) % start, step-size, end

plot(conv_fft (10000:10000:100000))

Please consider working on this answer first. The answer to other questions will be answered shortly.

Add a comment
Know the answer?
Add Answer to:
Please can you solve it using MATLAB. (1) Generate random signals [n] and hn, each of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • can someone help me do this and maybe also the picture of the scope explain how you get it. thankyou! Frequency-sh...

    can someone help me do this and maybe also the picture of the scope explain how you get it. thankyou! Frequency-shift keying (FSK) and Phase-shift keying (PSK) Two other modulation schemes are the phase-shift keying (PSK) and the frequency-shift keying (FSK). These are illustrated in Figure 8 b and c respectively. In phase-shift keying the carrier signal changes phase by a radians when the digital signal changes values. In frequency-shift keying a 0 is transmitted at a different carrier frequency...

  • Hi can you help me solve the following Signals and Systems question on Forward and Inverse Fourie...

    Hi can you help me solve the following Signals and Systems question on Forward and Inverse Fourier Transform. I have attached the answers for your reference. (Note: As the answers are in random order, only 2 out of the 5 are correct.) Thank you. 15. Using the multiplication-convolution duality of the CTFT, find an expression for y(0) that does not use the convolution operator * and graph y(U) (a) y(1)= rect() * cos(n) (b) y(1)=rect(t) * cos(2π) Multiplication-Convolution Duality Properties:...

  • Need MatLab code Exercise: Use MATLAB to generate the sinusoidal waveform: x(t) = 3 cos(1200) Consider...

    Need MatLab code Exercise: Use MATLAB to generate the sinusoidal waveform: x(t) = 3 cos(1200) Consider the frequency of this sinusoid and use this information to select an appropriate time-step and time array that will allow this signal to be correctly represented and displayed on a new MATLAB figure window (display 4 periods of this wave only). Now set up an appropriate frequency array and use the fft() and fftshift() functions to generate and plot the Fourier Transform (magnitude spectra)...

  • Q: please solve using matlab code withe comment 1.      Write the Matlab code to generate: x...

    Q: please solve using matlab code withe comment 1.      Write the Matlab code to generate: x = cos(w1*t) + cos(w2*t); where, w1=7; w2=23; t = [0:0.005:2] 2.   Plot the signal using sub plot a.   in time domain b.   in frequency domain 3)   Sample the signal under different sampling conditions: a.      Ts<1/2fm b.      Ts=1/2fm c.       Ts>1/2fm 4).      Multiple plot: the signal sampled under sampling condition and the signal x a.      in time domain b.      in frequency domain c.       Label and Title...

  • Signal xo(t) 5 cos (200π1+ 품 ) + 4 sin (300π) is sampled at a rate of Fs = 1 kHz to obtain the discrete-time signal x[n]. (a) Determine the spectrum X(ej ) of x[n] and plot its magnitude as a functi...

    Signal xo(t) 5 cos (200π1+ 품 ) + 4 sin (300π) is sampled at a rate of Fs = 1 kHz to obtain the discrete-time signal x[n]. (a) Determine the spectrum X(ej ) of x[n] and plot its magnitude as a function of ω rad sam in tad and as a function of F in Hz. Explain whether the original signal xe(t) can be recovered from xln]. (b) Repeat part (a) for 500 Hz. (c) Repeat part (a) for 100...

  • Can you please help me answer Task 2.b? Please show all work. fs=44100; no_pts=8192; t=([0:no_pts-1]')/fs; y1=sin(2...

    Can you please help me answer Task 2.b? Please show all work. fs=44100; no_pts=8192; t=([0:no_pts-1]')/fs; y1=sin(2*pi*1000*t); figure; plot(t,y1); xlabel('t (second)') ylabel('y(t)') axis([0,.004,-1.2,1.2]) % constrain axis so you can actually see the wave sound(y1,fs); % play sound using windows driver. %% % Check the frequency domain signal. fr is the frequency vector and f1 is the magnitude of F{y1}. fr=([0:no_pts-1]')/no_pts*fs; %in Hz fr=fr(1:no_pts/2); % single-sided spectrum f1=abs(fft(y1)); % compute fft f1=f1(1:no_pts/2)/fs; %% % F is the continuous time Fourier. (See derivation...

  • using MATLAB Q5. Let x(n) = T(n) be the next function: T(n) = [0.5 +0.5cos(in/N)] Where...

    using MATLAB Q5. Let x(n) = T(n) be the next function: T(n) = [0.5 +0.5cos(in/N)] Where N = 50 and n = [0 : M]. Using the properties of the DTFT, determine and plot the DTFT (magnitude and phase normalized in w) of the following: 1. X(n) = T(-n). 2. X(n) = T(n) enten

  • I need help with number 2 . Please answer in MATLAB thank you! 1. In the lab we analyzed filtering 60 Hz power-line noi...

    I need help with number 2 . Please answer in MATLAB thank you! 1. In the lab we analyzed filtering 60 Hz power-line noise from ECG signal using a digital (signal processing) filter. Now let's try to an analog (circuit) filter approach to remove the 60 Hz line-noise. Following is an active twin-T notch filter with transfer function: (1+m)((2joRC? +1 Z(a) 2R 2R Here m is the ratio of the two feedback 2C R resistance which determines the gain and...

  • solve using MatLab please. HW - 1 Use a cover page Word file attached for the...

    solve using MatLab please. HW - 1 Use a cover page Word file attached for the homework solution. Solve all questions using Word and the Matlab output should be copied into the Word file. All questions and answers should be numbered HW1.1 Generate the following sequences using the basic MATLAB signal functions and the basic MATLAB signal operations discussed in this chapter. Plot signal samples using the stem function. 1- x(n) = n°[u(n+5] – u(n-6) + 105(n) + 20(0.5)* [u(n-4)...

  • (5%) The following signals r t) is sanpled periodically to obtained the discrete-time signal [n. ...

    Please explain why. Thank you. (5%) The following signals r t) is sanpled periodically to obtained the discrete-time signal [n. For each of the given sampling rates in F, Hz or in T period, (i) determine the spectrum x(eM) of x[n]; (ii) plot its magnitude and phase as a function of w in and as a function of sampling frequency Fs in HZ; and (iii explain whether e(t) can be recovered from rn] (a) re(t) 8 +12e-3207e-j0(+), with sampling rate...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT