I have two vectors representing the edges and levels some continuous data (this is simulated at the moment).
edges = [50, 120, 170, 200, 220, 224, 250]
levels = [24,3,30,0,36,0]
How would I create a vector that has 24 for the first 50 entries, 3 for the subsequent 120 etc?
I've tried
psd = zeros(1,250)
psd(edges) = levels
but this just puts a single value at the relevant position - it's not quite what I want.