CODE:
N=input('Enter the length of input');
L=input('Up-sampling factor');
f=input('enter the input signal frequency');
n=0:N-1;
x=sin(2*pi*f*n);
y=zeros(1,L*length(x));
y([1:L:length(y)])=x;
subplot(2,1,1);
stem(n,x);
xlabel('time index n');
ylabel('amplitude');
subplot(2,1,2);
stem(n,y(1:length(x)));
title('output sequence');
xlabel('time index n');
ylabel('amplitude');
OUTPUT:
Enter the length of input
50
Up-sampling factor 3
enter the input signal
frequency 0.12
0 comments:
Post a Comment