MATLAB: How to convert data points to time sampling ratetime Hi, so I have this data and I want to convert the x-axis to time. Right now the x-axis represents the data point. Please help. Best Answer Make a datetime or duration array and call plot with that as the first data input.v = 1:10;x = datetime('today')+days(v);y = v.^2;plot(x, y)t = hours(v);plot(t, y) Related SolutionsMATLAB: I have time in hours, for 7days, I want to plot two variable parameters in y axis and the time in days in x axis. How do i plot ?? I have problems converting hours to days along x axis. Convert the time in hours to date numbers for the actual times (or use a reference arbitrary start time) and plot versus it. Then format the x axis withdatetick('x','keeplimits')and format as desired. MATLAB: Marking points A=[12 34 90 45];B=[0 8 9 36];C = [ 1 2 3 4];plot(A,B,'b')hold onplot(A,C,'r') Related QuestionHow to plot multiple days’ worth of data without overlappingPlotting data throughout a 24 hour periodPlotting non-linearly spaced data pointsHow do separate plot into months
Best Answer