I have a fairly simple issue and I just want to know if there's an easy way to do it in MATLAB (i.e. a function to do this rather than writing out loops or something myself).
Let's say I have a timeseries where Time is 1:1:1000
and Data is 2 * (1:1:1000)
and I want to expand the array by making the Time and Data vector finer. Let's say that I want Time to be 1:0.1:1000
and Data to be 2 * (1:0.1:1000)
. Is there an easy way to tell MATLAB that to repeat the values of each vector 10
times (from 1 / 0.1 = 10
) so that I can have something like this?:
Time: [1, 2, 3, 4, ...]
Data: [2, 4, 6, 8, ...]
to:
Time: [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, ...]
Data: [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, ...]