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.

답변 (2개)

Ameer Hamza
Ameer Hamza 2020년 9월 26일

0 개 추천

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일

0 개 추천

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

댓글 수: 2

Chris
Chris 2024년 6월 17일
plot(x, y)
Chris
Chris 2024년 6월 17일
x=[1 2 3 4];
y=[5 3 1 7]
plot(x, y)

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

2020년 9월 26일

댓글:

2024년 6월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by