MATLAB: Problem Expanding a Matrix

expanding

Hi all,
How can I do the following:
Say that I start with a vector with the elements [5 3 4 9 10] – think of these numbers like daily stock prices. I want to transform this vector into (an approx.) of intraday stock prices – 1/10 of day.
Therefore my vector should look like [ 5 4.8 4.6 4.4 .4.2 4 3.8 3.6 3.4 3.2 3 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9 10]
THank you!!

Best Answer

I figured out some other way
x = 0:4; y = [5 3 4 9 10]; >> xnew = 0:.1:4; ynew = interp1(x,y,xnew,'linear');