0% found this document useful (0 votes)
47 views

Generation of Diff Signal

The document generates and plots 9 different signals over time: sinusoidal, cosine, square, sawtooth, tripuls, sinc, unit step, impulse, and ramp. For each signal, it defines the equation, plots the signal values against time on a subplotted graph, labels the axes and titles the graph.

Uploaded by

ranjith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Generation of Diff Signal

The document generates and plots 9 different signals over time: sinusoidal, cosine, square, sawtooth, tripuls, sinc, unit step, impulse, and ramp. For each signal, it defines the equation, plots the signal values against time on a subplotted graph, labels the axes and titles the graph.

Uploaded by

ranjith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

%Generation of diff signals

clc
clear all;
close all
t=-10:0.001:10;
%Generation of sin signal
x1=sin(t);
subplot(3,3,1)
plot(t,x1);
grid;
xlabel('time');
ylabel('amplitude');
title('sin signal');
%Generation of cos signal
x2=cos(t);
subplot(3,3,2)
plot(t,x2);
grid;
xlabel('time');
ylabel('amplitude');
title('cos signal');
%Generation of square signal
x3=square(t);
subplot(3,3,3)
plot(t,x3);
grid;
xlabel('time');
ylabel('amplitude');
title('square signal');
%Generation of sawtooth signal
x4=sawtooth(t);
subplot(3,3,4)
plot(t,x4);
grid;
xlabel('time');
ylabel('amplitude');
title('sawtooth signal');
%Generation of tripuls signal
x5=tripuls(t,0.5);
subplot(3,3,5)
plot(t,x5);
grid;
xlabel('time');
ylabel('amplitude');
title('tripuls signal');
%Generation of sinc signal
x6=sinc(t);
subplot(3,3,6)
plot(t,x6);
grid;
xlabel('time');
ylabel('amplitude');
title('sinc signal');
%Generation of unitstep signal
x7=(t>=0);
subplot(3,3,7)
plot(t,x7);
grid;
xlabel('time');
ylabel('amplitude');
title('unitstep signal');
%Generation of impulse signal
x8=(t==0);
subplot(3,3,8)
plot(t,x8);
grid;
xlabel('time');
ylabel('amplitude');
title('impulse signal');
%Generation of ramp signal
x9=(t);
subplot(3,3,9)
plot(t,x9);
grid;
xlabel('time');
ylabel('amplitude');
title('ramp signal');

You might also like