Sie sind auf Seite 1von 1

clc;

F=2;
SF=8;
SF=SF/F;
subplot(2,1,1)
t=0:1/1800:M/F;
xa=sin(2*pi*F*t);
plot(t,xa);grid on;
xlabel('Time,msec'); ylabel('Amplitude');
title('Continuous-time signal x_{a}(t)');
subplot(2,1,2)
Fs=SF*F;
T=1/Fs;
n=0:(length(t)-1);
xp=sin(2*pi*F*n*T);
np=0:T:1;
N=length(np);
k=0:N-1;
xn=xp(1:(N));
plot((N-1)*t,xa,'r-');hold on;
stem(k,xn);grid on;
xlabel('Time index n'); ylabel('Amplitude');
title('Discrete-time signal x[n]');

Das könnte Ihnen auch gefallen