Interpolate X-Y coordinates with variable velocity to specified sampling frequency
显示 更早的评论
Can anyone help me interpolate between XY position coordinates with varying velocities between the coordinates. For example, I have a 3xn array with X-Y coordinates (mm) and a linear velocity (mm/s) for traveling from i to i+1 coordinates. I would like to resample these data via linear interpolation at 60 Hz as a series of XY cooridnates in the time domain. For context, these are coordinates for a CNC machine where you specifiy the desired coordinates and a rate at which to move to those coordinates. I would like to calculate intermediate coordinates at 60 Hz.
Thank you.
1 个评论
Cris LaPierre
2021-6-3
You need to figure out the distance between the two points, and then the number of time steps (at 60 Hz) is needed to cover that distance at the indicated velocity. Only then can you use interpolation to figure out you X and Y values at each time step.
Because the velocities will change from one position to the next, you will likely need to do this in a loop.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!