Use matlab to use the solution xt to prove it match up to th
Use matlab to use the solution, x(t) to prove it match up to the question.
You need to find x[n] from x(t), put it as your function which is only in terms of n-variable, then do the fft which gives you your X[m] then plot the magnitude and phase plot, which is the proof.
ps. on the bottom of a image. thnk you
Solution
clear all;
close all;
%x=[1 2 3 4]
x=input(\'enter the input sequence\');
n=input(\'enter the lenth of DFT\');
subplot(4,1,1);
stem(x);
xlabel(\'time\');
ylabel(\'amplitude\');
title(\'input signal\');
y=fft(x,n);
subplot(4,1,2);
stem(y);
xlabel(\'frequency\');
ylabel(\'amplitude\');
title(\'discrete fourier transform\');
z=abs(y);
subplot(4,1,3);
stem(z);
xlabel(\'frequency\');
ylabel(\'magnitude\');
u=angle(y);
subplot(4,1,4);
stem(u);
xlabel(\'frequency\');
ylabel(\'phase plot\');
![Use matlab to use the solution, x(t) to prove it match up to the question. You need to find x[n] from x(t), put it as your function which is only in terms of n- Use matlab to use the solution, x(t) to prove it match up to the question. You need to find x[n] from x(t), put it as your function which is only in terms of n-](/WebImages/23/use-matlab-to-use-the-solution-xt-to-prove-it-match-up-to-th-1055365-1761550516-0.webp)