Syntax
IVL=vecinterpolate(VL,[stp])
Input Parameter
VL : | | list of row vectors |
stp : | | step number for interpolation |
Output Parameter
IVL : | | Interpolated vector list |
Examples
vecinterpolate([NaN 1 2 3 ; 0 4 5 6; 30 40 50 60; nan 400 500 600],2)
vecinterpolate([0 0 0; 10 20 30],5)
Copyright 2019-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This algorithm performs interpolation on a list of row vectors, which is useful for creating interpolation values for n DoF robot kinematics.
Input Parameters
- VL: A list of row vectors. This is the primary data input for the interpolation process.
- stp: Step number for interpolation. It determines how many interpolated points are generated between each pair of vectors in VL.
Output
- IVL: The interpolated vector list. It contains the original vectors and the interpolated vectors between them.
Algorithm Steps
- Retrieve the step number stp from the input parameters. If not provided, default to 1.
- Determine the number of rows nr and columns nc in the input vector list VL.
- Initialize an empty matrix IVL with dimensions (nr*stp, nc) filled with NaN values to store the interpolated vectors.
- Set a counter k to 1 to track the position in the output matrix IVL.
- Loop through each pair of consecutive vectors in VL:
- Calculate the difference vector dv between the current and previous vectors.
- Divide dv by stp to get the step vector sv.
- For each step from 0 to stp, calculate the interpolated vector by adding u*sv to the previous vector and store it in IVL.
- Increment the counter k after each interpolation.
- After completing the loop, adjust k to remove any unused rows in IVL.
- Return the interpolated vector list IVL.
Algorithm explaination created using ChatGPT on 2025-08-18 23:58. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21