I’m trying to plot values in matlab.
my csv file looks like this,
> 15.12.2012 11:27; 0.9884753
> 15.12.2012 11:12; 10.670.642
> 15.12.2012 10:57; 114.455.145
> 15.12.2012 10:42; 101.301.446
> 14.12.2012 10:27; 0.99031037
> 14.12.2012 10:12; 104.594.388
> 14.12.2012 09:57; 0.97192177
> 14.12.2012 09:42; 0.8925
> 14.12.2012 09:27; 0.8985693
> 14.12.2012 09:12; 0.955
> 14.12.2012 08:57; 0.95103529
> 13.12.2012 08:42; 0.95203444
> 13.12.2012 08:27; 0.955
> 13.12.2012 08:12; 0.95970876
> 13.12.2012 07:57; 0.95929422
> 13.12.2012 07:42; 0.95578656
> 13.12.2012 07:27; 0.955
> 12.12.2012 07:12; 0.955
> 12.12.2012 06:57; 0.95342687
> 12.12.2012 06:42; 0.955
> 12.12.2012 06:27; 0.955
> 12.12.2012 06:12; 0.95930485
> 11.12.2012 05:57; 0.95530825
> 11.12.2012 05:42; 0.96452381
> 10.12.2012 05:27; 0.9675
> 10.12.2012 05:12; 0.98778061
> 10.12.2012 04:57; 102.982.993
I ‘m reading ‘11.12.2012 04:57’; as string and then using datvec.
[Y, M, D, H, MN, S] = datevec(‘String’)
Just to make it clear again
Col1=String % [Y, M, D, H, MN, S]
Col2= number % [0.9884753;...;102.982.993]
Now i want to plot second col2 with respect to first Col1 ([Y, M, d].
plot (Col2)
It works . In my example data I have more than a single value for the same day.
How can I label my plot with date that appear only once per day.
regards,
You can do something as listed below. Since the date strings are not so short, it looks nicer to render them rotated (with rotateticklabel).
And this is what you can get:
