Prev: nntool
Next: spatial data and neural networks
From: Jane on 12 Feb 2010 14:40 I want to predict points along an X Y Z path in 3d space.
From: Jan Simon on 12 Feb 2010 14:59 Dear Jane! > I want to predict points along an X Y Z path in 3d space. Please post a relevant small part of your code. Show us the inputs, what you have tried so far and the results you want. I cannot imagine what you are doing exactly if I read this sentence above. Kind regards, Jan
From: Jane on 12 Feb 2010 15:47 I want a fixed value for the amount of points. For example I have 3 Matricies. The first matrix has rows 1000 by 3 and the second has rows 463 by 3. I wanted to interpolate the second matrix to equal the first matrix's row count of 1000. first i did: a1 = size(first matrix,2); a2 = size(second matrix,2); then i said to find the step required in the interpolation i divided second matrix by first matrix. step = a2/a1; This is where i get lost. I understand that in interp1 example. it says 0:10 with e.g. step 0:2:10 data but my data starts from e.g. -9 to -0. Please help me write this part. But interp1 doesn't use 3 columns. I also read that plot3 will interpolate between values but how do i get it to return values along that path equal to 1000 including known points.
From: Jan Simon on 12 Feb 2010 17:37 Dear Jane! > I want a fixed value for the amount of points. For example I have 3 Matricies. The first matrix has rows 1000 by 3 and the second has rows 463 by 3. > I wanted to interpolate the second matrix to equal the first matrix's row count of 1000. x = 1:463; t = (x / 100) - 1; y = sin(t / 100); y2 = interp1(t, y, linspace(t(1), t(end), 1000)) Now your y2 is a sin wave with 1000 steps instead of 463. x need not be sorted or equally spaced, y can be a matrix also. > This is where i get lost. I understand that in interp1 example. it says 0:10 with e.g. step 0:2:10 data but my data starts from e.g. -9 to -0. I do not understand the qualitative difference between 0:10 and -9:0. Both are fairly equivalent. > Please help me write this part. But interp1 doesn't use 3 columns. INTERP1 does operate on matrices with 3 columns. Good luck, Jan
From: Jane on 12 Feb 2010 18:20
Im not sure I understand t. x = D1X; y = D1Y; y2 = interp1(x, y, linspace(t(1), t(end), 1000)) I want to keep the data of x and y in the same order. D1X = 413x1 D1Y = 413x1 how do i define t. |