Plotting data points with their respected data & Time
2 ビュー (過去 30 日間)
古いコメントを表示
I am writting a program that reads in data from a text file from 6 different actutors and what time the scripted commmand took place. I then find what I am looing for and plot the actuator points and their position. However I am also trying to plot what time they were scripted from a datetime cell called dates. It plots the dates as a function of time and not with their respected actuator points. It is working with dates but not the time. If hover over the actuator points it gives the date they took place but not the time. Please help me get time when i hover over these points.
2 件のコメント
Boxn Hen
2020 年 7 月 24 日
Could you show your codes as below?I want to learn something from your work,although I'm not sure about your question.Thank you!
回答 (1 件)
Harsha Priya Daggubati
2020 年 7 月 27 日
Hi,
From R2016b onwards, you can plot datetime objects along with the data you have.
Take a look at the following code:
ds =
10×1 datetime array
02-Feb-2018 11:08:11
02-Feb-2018 12:08:13
02-Feb-2018 01:08:14
02-Feb-2018 02:08:15
02-Feb-2018 03:08:17
02-Feb-2018 04:08:18
02-Feb-2018 05:08:20
02-Feb-2018 06:08:21
02-Feb-2018 07:08:23
02-Feb-2018 08:08:24
r =
0.0179
0.0180
0.0184
0.0184
0.0189
0.0189
0.0189
0.0189
0.0190
0.0190
plot(ds,r);
I attached the plot I got with the above code.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!