Up-sampling of a vector (insert a zero after every element except the last one)
function upsample input Real u[:] = {1, 2, 3, 4} "Input vector"; output Real y[size(u, 1)*2 - 1] "Output vector with the (double length of u) -1"; end upsample;