Entering Data to plot Graphs

hi, i am new to MATLAB and i need help to use it for my assignment
so i was given a set of data and asked to plot it onto a graph. but i am not sure how to.
do i enter the values into a table or array? can anyone help me? any help would be deeply appreciated.

Respuestas (2)

Ameer Hamza
Ameer Hamza el 26 de Sept. de 2020

0 votos

Just entering as an array would be fine. See plot(): https://www.mathworks.com/help/matlab/ref/plot.html. Here is a very simple example
x = [1 2 3 4]; % x and y values are chosen as example
y = [5 3 1 7];
plot(x, y)
Chris
Chris el 17 de Jun. de 2024

0 votos

x=[1 2 3 4];
y=[5 3 1 7]

2 comentarios

Chris
Chris el 17 de Jun. de 2024
plot(x, y)
Chris
Chris el 17 de Jun. de 2024
x=[1 2 3 4];
y=[5 3 1 7]
plot(x, y)

Iniciar sesión para comentar.

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Productos

Versión

R2019a

Etiquetas

Preguntada:

el 26 de Sept. de 2020

Comentada:

el 17 de Jun. de 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by