How to plot data?

조회 수: 3 (최근 30일)
Ali Najem
Ali Najem 2021년 7월 28일
댓글: Ali Najem 2021년 7월 28일
Hi all,
I just want to plot these data in matlab, however, I got confused about plotting
Time 1/1/2020 2/1/2020
00 - 01 46.88 36.24
01 - 02 51 32.74
02 - 03 48.26 31.22
03 - 04 35.18 28.12
04 - 05 31.8 27.68
05 - 06 30.94 27.89
06 - 07 30.88 33.13
07 - 08 30.8 41.1
08 - 09 31.6 43.54
09 - 10 32.82 44.08
10 - 11 38.26 44.51
11 - 12 44.6 46.16
12 - 13 52.26 46.22
13 - 14 46.94 45.96
14 - 15 46.94 45.1
15 - 16 46.58 44.98
16 - 17 43.42 45.42
17 - 18 58.91 47.47
18 - 19 62.55 54.16
19 - 20 50.46 47.2
20 - 21 48.28 44.73
21 - 22 42.25 37.76
22 - 23 42.16 33.8
23 - 00 37.56 32.62
Where, x axes will be from 0-24 and y-axes should be the values. so, how can I settle it in matlab where the plot must same be as attached image

채택된 답변

KSSV
KSSV 2021년 7월 28일
편집: KSSV 2021년 7월 28일
T = readtable(filename) ; % your file where data is present
x = (1:24)' ;
plot(x,T.(2),'r',x,T.(3),'b')
  댓글 수: 5
KSSV
KSSV 2021년 7월 28일
편집: KSSV 2021년 7월 28일
T = readtable(filename) ; % your file where data is present
plot(T.(2),'r')
hold on
plot(T.(3),'b')
Ali Najem
Ali Najem 2021년 7월 28일
it worked, but unfortunately not as expected graph

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by