Entering Data to plot Graphs

23 vues (au cours des 30 derniers jours)
Sean Wong
Sean Wong le 26 Sep 2020
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.

Réponses (1)

Ameer Hamza
Ameer Hamza le 26 Sep 2020
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)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by