- First, create a time range that spans from 2/6/2021 7:12 AM to 2/7/2021 1:31 PM with 1-minute intervals. You can use MATLAB’s “datetime” (https://www.mathworks.com/help/matlab/ref/datetime.html) function.
- Next, format the x-axis to show only the time part, not the full date.
- For labeling, you can choose every 6 hours on the x-axis. Use “xticks” (https://www.mathworks.com/help/matlab/ref/xticks.html) and “xticklabels” (https://www.mathworks.com/help/matlab/ref/xticklabels.html) to define custom ticks and labels for the x-axis.
