Here is a program for generation of exp. and ramp Signal in MAT LAB in continuous and discreet form.
open MAT LAB open new script and paste this program :-
Program :-
-----------------------------------------------------------------------------------------------------------------------
n=input('enter the value of n=');
t=0:0.5:n;
x=exp(t);
subplot(221);
plot(x);
ylabel('amp.');
xlabel('time');
title('cont. exp signal');
subplot(222);
stem(x);
ylabel('amp.');
xlabel('time');
title('dis. exp signal');
y=t;
subplot(223);
plot(y);
ylabel('amp.');
xlabel('time');
title('cont. ramp signal');
subplot(224);
stem(y);
ylabel('amp.');
xlabel('time');
title('dis. ramp signal');
-----------------------------------------------------------------------------------------------------------------------
open MAT LAB open new script and paste this program :-
Program :-
-----------------------------------------------------------------------------------------------------------------------
n=input('enter the value of n=');
t=0:0.5:n;
x=exp(t);
subplot(221);
plot(x);
ylabel('amp.');
xlabel('time');
title('cont. exp signal');
subplot(222);
stem(x);
ylabel('amp.');
xlabel('time');
title('dis. exp signal');
y=t;
subplot(223);
plot(y);
ylabel('amp.');
xlabel('time');
title('cont. ramp signal');
subplot(224);
stem(y);
ylabel('amp.');
xlabel('time');
title('dis. ramp signal');
-----------------------------------------------------------------------------------------------------------------------
just paste the program, press run, enter the value of 'n' (numerical). get output :-
Output :-
Output :-
IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.
GOOD LUCK
No comments:
Post a Comment