MATLAB: How to create a special axis

axesaxisMATLABplotplotting

Hi I have to plot a vector of some sperimental data (Electrical Power measurements). Each data correspond to a time-step. I have already put all the time-steps in another vector. It's possibile to have a plot whit the value of the data in the Y-axis and with the time-steps on the X-axis? Maybe i have to be more clearer, i don't want to plot the time step like (1,2,3, ecc…) i have them in a time format like 12:30:15 (12 is the hour, 30 the minutes, 15 the seconds) And if it' possibile to plot a graph like this, how can i choose the interval with whom matlab plot the information from the time-steps vector? I hope someone can help me Thanks for all.

Best Answer

There are several ways to plot your x-axis with time and date data. See for example the datetick function. Also, in the plot documentation see: Plot Durations and Specify Tick Format. Another possibility is: Date and Time Arithmetic and Plotting.