Entering Data to plot Graphs

조회 수: 9 (최근 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]
  댓글 수: 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)

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

카테고리

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