Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.
|
|
|
Re: Uneven grid points?
Posted:
Oct 8, 2012 6:55 AM
|
|
"Shashank " <shashank312@yahoo.co.uk> wrote in message <k4tv8b$kbp$1@newscl01ah.mathworks.com>... > How to create a variable (using linspace) for the following configuration: > > Distance between the first and second point = 0.5h > Distance between the second and third point = h > Distance between the third and fourth point = h > And so on... > Distance between the (N-2)th and (N-1)th point = h > Distance between the (N-1)th and Nth point = 0.5h > > A quick retort would be appreciated. > X = cumsum([0,0.5,ones(1,nX-3), 0.5])*h;
HTH
|
|
|
|