how to plot graph

조회 수: 2 (최근 30일)
Raheema Syed
Raheema Syed 2019년 2월 8일
답변: Star Strider 2019년 2월 8일
Suppose i have a result,
result = 1 2 3 4
5 6 7 8
9 10 11 12
where in this 3x4 matrix, the 3 rows denote 3 different generator and 4 coloumns denote time period in four hours.
how to plot a graph for time vs the generation. that is in x-axis you will have 4 hrs time period with 1 hr difference and y axis will be generation takin into account the 3 different generator values for each hour.
The above one is for example purpose. I need to plot for 6 generating units for 12 hours.

답변 (1개)

Star Strider
Star Strider 2019년 2월 8일
result = [1 2 3 4
5 6 7 8
9 10 11 12];
time = [1 2 3 4];
figure
plot(time, result)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by