MATLAB: How to increase the dataset length by Interpolation

interpolationnonlinearvector

I want to increase my data set length from say 5571×1 to 5590×1 by interpolating it non linearly since this dataset is experimental and there is no fixed interval.
All i've experimented with is using 'interp' and 'interp1' but no luck so far.

Best Answer

This is a simple example which interpolates the data using cubic interpolation
x = rand(5571, 1); % your signal
t = linspace(0, 1, numel(x));
n = 5590; % required length
t_ = linspace(0, 1, n);
x_ = interp1(t, x, t_, 'spline').'; % x_ has dimensions of 5590x1
Related Question