Entering Data to plot Graphs

8 次查看(过去 30 天)
Sean Wong
Sean Wong 2020-9-26
评论: Chris 2024-6-17
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.

回答(2 个)

Ameer Hamza
Ameer Hamza 2020-9-26
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 2024-6-17
x=[1 2 3 4];
y=[5 3 1 7]

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by