Plot y = sin(x) graph (Octave platform)
Download the file simple_graph.m
Download the file simple_graph.m
% Simple y=sin(x) graph plot
x= 0:0.01:2*pi; % x Vector of x values
y = sin(x); % y vector ' y = sin(x)
plot(x,y) % Plot the graph y = sin(x)
% Add tiltles and grid
xlabel('x')
ylabel('sin(x)')
title('Graph - y = sin(x)')
grid
x= 0:0.01:2*pi; % x Vector of x values
y = sin(x); % y vector ' y = sin(x)
plot(x,y) % Plot the graph y = sin(x)
% Add tiltles and grid
xlabel('x')
ylabel('sin(x)')
title('Graph - y = sin(x)')
grid
The Graph
No comments:
Post a Comment