diff.h

Author

Zhu Dengda (zhudengda@mail.iggcas.ac.cn)

Date

2023-03

Functions

void get_diff_odr1(const MYREAL *pt, double h, double *acoef, double *bcoef, double *diff)

一阶差分, \( \frac{T-T_{i-1}}{h} \) , 形成 \( aT-b \) 的形式

参数:
  • pt – (in)数组

  • h – (in)差分间隔

  • acoef – (out)系数结果a

  • bcoef – (out)系数结果b

  • diff – (out) \( aT-b \)

void get_diff_odr2(const MYREAL *pt, double h, double *acoef, double *bcoef, double *diff)

二阶差分, \( \frac{3T - 4T_{i-1} + T_{i-2}}{2h} \) , 形成 \( aT-b \) 的形式

参数:
  • pt – (in)数组

  • h – (in)差分间隔

  • acoef – (out)系数结果a

  • bcoef – (out)系数结果b

  • diff – (out) \( aT-b \)

void get_diff_odr3(const MYREAL *pt, double h, double *acoef, double *bcoef, double *diff)

三阶差分, \( \frac{11T - 18T_{i-1} + 9T_{i-2} - 2T_{i-3}}{6h} \) , 形成 \( aT-b \) 的形式

参数:
  • pt – (in)数组

  • h – (in)差分间隔

  • acoef – (out)系数结果a

  • bcoef – (out)系数结果b

  • diff – (out) \( aT-b \)

void get_diff_odr123(MYINT odr, const MYREAL *pt, double h, double *acoef, double *bcoef, double *diff)

计算一 or 二 or 三阶差分 , 形成 \( aT-b \) 的形式

参数:
  • odr – (in)阶数,1or2or3

  • pt – (in)数组

  • h – (in)差分间隔

  • acoef – (out)系数结果a

  • bcoef – (out)系数结果b

  • diff – (out) \( aT-b \)