---
title: KIPL_Csval
description: "计算三次样条拟合函数在位置x的值。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpckit/devg/kunpengaccel_kml_0589.html
sourcePath: /source/zh/kunpenghpcs/hpckit/devg/kunpengaccel_kml_0589.html
indexId: ca8e30c3e222c54c4290e953d8370c1bdad3186c59d2c98e60206435a493a14961
---
# KIPL_Csval

计算三次样条拟合函数在位置x的值。

#### 接口定义

float KIPL_Csval(float xi, int initv, float *xData, float *coef)


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| xi | 单精度浮点数 | 需要计算三次样条拟合值的位置。 | 输入 |
| initv | 整型数 | 表示拟合得到三次多项式个数，等于nData\-1。 | 输入 |
| xData | 单精度浮点数组 | 长度为initv+1的数组，表示数据点的横坐标。 | 输入 |
| coef | 单精度浮点数组 | 长度为4\*(initv+1)的数组，表示生成的系数序列。 | 输出 |


#### 依赖

#include "kipl.h"
