Anda di halaman 1dari 1

clf;

N=input('enter the length of signal=');


n=0:1:N-1;
us=ones(1,N);
subplot(3,2,1);
stem(n,us);
xlabel('time index n');
ylabel('amplitude');
title('Dt unit step signal');
N=input('enter the length of signal=');
n=0:N;
k=input('enter the scaling constant=');
ur=k*n;
subplot(3,2,2);
stem(n,ur);
xlabel('time index n');
ylabel('amplitude');
title('Dt unit ramp signal');
N=input('enter the length of signal=');
n=0:N;
k=input('enter the scaling constant=');
a=input('enter the value of real constant=');
x=k*a.^n;
subplot(3,2,3);
stem(n,x);
xlabel('time index n');
ylabel('amplitude');
title('Dt real-valued exponential signal');
N=input('enter the length of signal=');
n=0:N;
f=0.1;
phase=0;
arg=2*pi*f*n;
A=1.5;
x=A*sin(arg);
subplot(3,2,4);
stem(n,x);
xlabel('time index n');
ylabel('amplitude');
title('DT sinusoidal signal');
x=A*cos(arg);
subplot(3,2,5);
stem(n,x);
xlabel('Time index n');
ylabel('amplitude');
title('DT co sinusoidal signal');

Anda mungkin juga menyukai