MATLAB Fundamentals>>>Applying Functions to Datetimes>附加练习

发布时间:2024年01月19日

MATLAB Fundamentals>Specialized Data Types>Working with Dates and Times>(3/5) Applying Functions to Datetimes>附加练习

任务:

There is also data from Manchester City in the workspace,?manCity. You can sort it, find the cumulative points, and then plot it over the Manchester United data to see how the teams compared over the season. Don't forget to issue the?hold?on?and?hold?off?commands to add a plot to the current data.

解决:

manCity

manCity = sortrows(manCity,"GameTime")

ptsTotmC = cumsum(manCity.Points)

hold on

plot(manCity.GameTime,ptsTotmC)

hold off

结果:

文章来源:https://blog.csdn.net/syluxhch/article/details/135617580
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。