Hi there,
I have a matrix variable x = [0 1 2 3]
I want to generates linearly spaced vectors in between the numbers into a variable. My problem here is concatenate the numbers into p the next time n increases.
I know i should be using linspace to generate number for eg:
for i = 1:(length(x)-1)p = linspace(x(i),x(i+1),0.5)end
the results i want is:
p = 0 0.5 1 1.5 2 2.5 3
Hope someone can shed some light here.
Best Answer