MATLAB Answers


Plot : how can I use datestr on a matrix?

Asked by Yasmine Torkhani on 20 Sep 2019
Latest activity Commented on by Star Strider
on 20 Sep 2019
Hello friends,
does anyone know how I can get the format of the date in a matrix from number to date with the normal format from time 'dd-mm-yyyy'? I have a matrix with a column date which I changed from string to number by 'datenum'. For the plot of my curve, I need the date as string again. Is that possible with a matrix?
Thanks in advance!


Sign in to comment.

1 Answer

Answer by Star Strider
on 20 Sep 2019
 Accepted Answer

To get date strings on a plot that uses datenum numbers, use the datetick function.


Nice!!!! This works fantastic on my figure!
Thank you a lot !!!!! :))))))
As always, my pleasure!

Sign in to comment.