The document contains programs to generate various basic functions including unit step, unit impulse, ramp, and exponential functions. It generates these functions in both continuous and discrete time and plots the results.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
51 views2 pages
Program To Generate A Unit Step Function DTS
The document contains programs to generate various basic functions including unit step, unit impulse, ramp, and exponential functions. It generates these functions in both continuous and discrete time and plots the results.
t=0:1:9; y=ones(1,10); subplot(3,3,2); plot(t,y); xlabel('time'); ylabel('x(t)'); title('unit step Function'); % program to generate a unit impulse function (dts)% t=-10:1:10; y=[zeros(1,10),ones(1,1),zeros(1,10)]; subplot(3,3,3); stem(t,y); xlabel('time'); ylabel('x(n)'); title('unit impulse Function')
% program to generate a Ramp function(cts)%
t=0:1:10; y=t; subplot(3,3,4); plot(t,y,'b'); xlabel('time'); ylabel('y(n)'); % program to generate a Ramp function (dts)% t=0:1:10; y=t; subplot(3,3,5); stem(t,y,'b'); xlabel('time'); ylabel('y(n)'); title('Ramp Function'); % program to generate a exponential function(cts)% t=0:1:10; a=input('enter the value'); y=a^t; subplot(3,3,6); stem(t,y,'b'); xlabel('time'); ylabel('y(n)');