.. highlightlang:: us .. _rspline: rspline ======= .. index:: rspline .. us.tag rspline ENGLISH New550 Interpolation :ref:`rspline` computes a rational spline under tension for a given x and y vector. .. function:: rmXY = rspline(rvX, rvY, p) rmXY = rspline(rvX, rvY, p, rsTensionFactor) rmXY = rspline(rvX, rvY, p, rsTensionFactor, flag) .. us.return **Return Value** The return value *rmXY* is a real matrix with two columns. The first column contains the x-coordinates of the spline and the second column contains the y-coordinates of the spline. In case of an error *rmXY* has only one element with an error number: .. list-table:: :header-rows: 0 * - 1 - not enough memory * - 2 - x-coordinates are not strictly increasing * - 3 - less than 3 datapoints specified. .. us.params **Parameters** .. uparam:: rvX *rvX* is a real vector with at least 3 elements. .. uparam:: rvY *rvY* is a real vector with at least 3 elemetns. .. uparam:: rsTensionFactor *rsTensionFactor* is a value in the range 0 to 100. For 0 the spline is similar to a cubic spline and for values close to 100 the result is a polygon. Default value is 1. .. uparam:: p The meaning of *p* depends on the value of the parameter *flag* .. uparam:: flag *flag* can be one of the following values: .. list-table:: :header-rows: 1 * - Value - Meaning * - 1 - p is the number of x-, y-coordinates calculated. * - 2 - p is the number of x-, y-coordinates calculated. The original x-coordinates are added to the total. * - 3 - p is a strictly increasing vector of x-coordinates. Default value is 1. .. us.example **Example** .. image:: S:/uniplot-obj/images/rspline.* .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.5.0 - New .. seealso:: :ref:`overview-mathematic`, :ref:`pspline`, :ref:`fspline`, :ref:`akimaspline`, :ref:`interpol` :sub:`id-1612071`