Interpolating trajectory from unsorted array of 2D points where order matters
问题 I need a way of obtaining a Lx2 trajectory from a Nx2 array of points, i.e. a way of connecting those points into a single trajectory (for example, create a 10000x2 array of points from a 5x2 array of points). I have tried using interp1 and interp2 but either I don't fully understand them or they don't do what I need. 回答1: It sounds like you need to be using interp1 in a loop (i.e. to preserve original order) interpolating between each consecutive pair of points: X = [10; 10.0001; 9; 48]; %//