How about using interp1 with the 'pchip' option? You did speculate the interpolation is overly complex, but then again it is only one line in Matlab.
First I generate some (fake) data similar to what you have shown.
y = @(x) 320*(1+tanh(x-5));
x = linspace(0,8)';
Ts = 1;
xi = [0:Ts:8]';
[xs,ys] = stairs(xi, y(xi))
plot(x,y(x), xs, ys, xi, y(xi), 'rs')
Now the ZOH sample & held data is (xi, y(xi)). Using only this data, we reconstruct the higher density data with interp1.
Ts2 = Ts/10;
xi2 = [0:Ts2:8]';
yq = interp1(xi, y(xi), xi2, 'pchip');
plot(xi, y(xi), 'rs', xi2, yq, 'b-')
I use the pchip option to avoid "wobbles" in the interpolation.
Best Answer