0% found this document useful (0 votes)
6 views2 pages

Sine Function Plotting in MATLAB

The document outlines a program to plot the sine function over the range from 0 to 2π using MATLAB. It includes code that generates the sine values and creates a plot with labeled axes and a title. The visual representation of the sine function is also described, showing its oscillation between -1 and 1.

Uploaded by

Som Mishra
Copyright
© All Rights Reserved
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% found this document useful (0 votes)
6 views2 pages

Sine Function Plotting in MATLAB

The document outlines a program to plot the sine function over the range from 0 to 2π using MATLAB. It includes code that generates the sine values and creates a plot with labeled axes and a title. The visual representation of the sine function is also described, showing its oscillation between -1 and 1.

Uploaded by

Som Mishra
Copyright
© All Rights Reserved
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

EXPERIMENT-1

Write a program to plot sine function in the range 0 to 2π.


clc;
close all;
x=[0:0.1:2*pi];
y=sin(x);
plot(x,y);
xlabel('angle(rad)');
ylabel('sine');
title('y=sin(x)');

y=sin(x)
1

0.8

0.6

0.4

0.2
sine

-0.2

-0.4

-0.6

-0.8

-1
0 1 2 3 4 5 6 7
angle(rad)

NAME-

ROLL NO.-

BRANCH-
y=sin(x)
1

0.8

0.6

0.4

0.2
sine

-0.2

-0.4

-0.6

-0.8

-1
0 2 4 6 8 10 12 14 16 18 20
angle(rad)

You might also like