Wednesday, July 1, 2020

Matlab - Plot simple graph

Plot y = sin(x) graph (Octave platform)
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


The Graph

Plot y = sin(x) graph (Octave platform)

No comments:

Post a Comment

Featured Post

Solve simple Absolute Value Inequality

  Exam - BARTON COLLEGE PRACTICE PLACEMENT TEST Ex. 39 Exercise: The inequality |8 - x| < 8   is equivalent to:   a) x < 0 b) x &g...