You are on page 1of 2

Objective:

To study & analysis sine and cosine signal .

Apparatus:

Using MatLab software analysis the signals


Procedure:
Open the MatLab Software
Click on File menu.
Select Script ( Ctrl+N) option in file menu
Assign the value to variable x&h
Use grid, stem set, and subplot command
Program:
%%%Cosine signal%%%
t=[0:0.6:pi];
y=cos(2*pi*t);
subplot(2,2,1)
stem (t,y);
xlabel('x');
ylabel('cos(t)');
title('cos(2pit)');

Now analysis the sine signal

%%%Sin signal%%%
t=[0:0.6:pi];
y=sin(2*pi*t);
subplot(2,2,2)
stem (t,y);
xlabel('t');
ylabel('sin(t)');
title('sin(2pit)');
Diagram:

You might also like