How did you plot the first figure? If you did not provide any x-axis, as in plot(ecg)
, the x-tick labels will be enumerated consecutevly in intervals of one. If you do know the corresponding time points t
of ecg
, you can use plot(t, egg);
.
Since you know the sampling rate and assume consistent intervals between each data point, you can generate t
yourself by t = 10.0 / 3600 * (0 : length(ecg)-1)
. This will create an array with length(ecg)
elements starting at 0, with 10.0 per 3600 data points, for any length of ecg
.
To align the horizontal axis limits more nicely than in the first plot, you can then also use xlim([0, t(end)])
.