how to plot graph

1 次查看(过去 30 天)
Raheema Syed
Raheema Syed 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