Plot data against time
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
Kindly help to plot this workspace data , first column is formatted date and secnd column data against the date:Original date is attached below:
1/17/2011 7:00
1/17/2011 9:00
1/17/2011 11:00
1/17/2011 13:00
1/17/2011 15:00
1/17/2011 17:00
image is attached for workspace data :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/519457/image.png)
0 件のコメント
回答 (1 件)
Cris LaPierre
2021 年 2 月 15 日
編集済み: Cris LaPierre
2021 年 2 月 15 日
Convert collumn 1 to a datetime and then just use the plot command. See Ch 9 of MATLAB Onramp if you need more help with plotting.
d = datetime(40560.29167,'ConvertFrom','excel','Format','M/d/yyyy HH:mm')
plot(d,101.745,'ro')
2 件のコメント
Cris LaPierre
2021 年 2 月 15 日
You wouldn't use a loop. You would use a variable contining all your values.
Share the code you've written so far and we can go from there.
参考
カテゴリ
Help Center および File Exchange で Legend についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!