I have a picture in my head of a specific DSP operation, but I don't know what it's called or how to google for it. I'm pretty sure it's a fairly common operation, however I have no idea what to call it.
Consider a discrete event that occurs at time interval (Excuse the ascii art):
| | | x | | | | _ | _ | | _ _ | _ _ 0 1 2 3 4 5 6 7 8 9 t
What I have is two vectors descibing this waveform.
x = [2,3,2,4]
t = [1,3,4,7]
What I want to do, is 'latch' the most recent signal over time, like this:
| | | | | | | x | | | | | | | | | _ | | | | | | | | | 0 1 2 3 4 5 6 7 8 9 t
Which would produce this waveform:
x = [0,2,2,3,2,2,2,4,4,4]
t = [0,1,2,3,4,5,6,7,8,9]
In electrical terms, this would be a memory element which remembers the most recent signal received. It also would be some crude interpolate function, however all the interpolates I know about (linear, cubic) fill in the in-between with more complicated functions.
I'd like to recreate this behaviour in Matlab but don't know how to google for what I want. So what's this called?