Question A finite duration signal, x(t), is given as: x(t) e 1000ltl where -5 ms
ID: 1996649 • Letter: Q
Question
Question A finite duration signal, x(t), is given as: x(t) e 1000ltl where -5 ms st s 5 ms. e) [10pts] From the samples x[n] reconstruct x(t) i.e., xr(t)) by using zero-order hold interpolation. Plot xr(t) with respect to t and comment on the results. Be sure to add a title and axis labels. Hint: The stairs function plots a staircase rendition of the analog signal, given its samples 10pts] From the samples XIn. reconstruct x(t) (i.e., xr(t)) by using first-order hold (FOH) interpolation: plot xr(t) with respect to t and comment on the results. Be sure to add a title and axis labels. Hint The plot function depicts a linear interpolation between samples. g) [15pts] By using the "sinc" interpolation formula given below, reconstruct xr(t) from the samples xIn]. MATLAB has the sinc function as sinc (x). Be sure to add a title and axis labels. Hint: You may use the interval for n given in (d). x(t)Explanation / Answer
(1) t=-5e-3:0.0001:5e-3;
x = exp(-1000*abs(t));
stairs(t,x);title('x(t)using zero order hold interpolation');
xlabel('time t');ylabel('x(t)');
(f) t=-5e-3:0.0001:5e-3;
x = exp(-1000*abs(t));
plot(t,x);title('x(t)using first order hold interpolation');
xlabel('time t');ylabel('x(t)');
(g) t=-5e-3:0.000001:5e-3;
x = exp(-1000*abs(t));
fs=400;
n=length(x);
y=x.*sinc(fs*(t-(n/fs)));
plot(t,y);title('resonstruction of x(t) using sinc function');
xlabel('time t');ylabel('x(t)');