
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

clc;close all;clear all; n=input('Enter the length of ramp sequence N = '); % Get the length s=input(' Enter the slop of the ramp S = '); % Get the slop of the ramp t=0:n-1; plot(t,s*t); ylabel ('Amplitude'); xlabel ('Time Index'); TITLE ('Ramp signal'); grid on
clc;close all;clear all;
n=input('Enter the duration of the signal N = '); a=input ('Enter the scaling factor a = '); t=0:.1:n-1; y=exp(a*t); subplot(2,1,1) plot(t,y); ylabel ('Amplitude'); xlabel ('Time Index'); TITLE ('Exponential Signal'); grid on x = linspace(-5,5); y = sinc(x); subplot(2,1,2); plot(x,y); xlabel('time'); ylabel('amplitude'); title('sinc function'); grid on
clc;close all;clear all; t=0:.0001:1; y=5sin(2pi1t); subplot(2,1,1); plot(t,y); ylabel ('Amplitude'); xlabel ('Time Index'); TITLE ('Sine wave'); grid on; t=0:.0001:1; y=5cos(2pi1t); subplot(2,1,2); plot(t,y); ylabel ('Amplitude'); xlabel ('Time Index'); TITLE ('cosine wave'); grid on