MATLAB: Change uiAxes DateNum to DateTime in AppDesigner for animatedLine Plot

animatedlineappdesignerMATLABuiaxes

Here, I have a UIAxes; with datenum tick marks. I have the values of x-ticks in String, as you can see from Time Field. I used datetickzoom and dynamicdateticks; but the zoom function gave error. Is there any possibility of changing these dateNum x-ticks to datetime ticks. It'll be better to use dynamic, but if there's no way for that, static vector ticks will also work.

Best Answer

Can you convert your X data to datetime before plotting? Plots support datetimes as x values. You can convert a string to datetime using the datetime('06-Jun-2020 02:26:26') syntax.
You can use xtickformat function to format the datetime appearance.