Function rc_filter_alloc_from_arrays#

Function Documentation#

int rc_filter_alloc_from_arrays(rc_filter_t *f, double dt, double *num, int numlen, double *den, int denlen)#

Like rc_filter_alloc(), but takes arrays for the numerator and denominator coefficients instead of vectors.

Arrays num and den must have lengths that form a proper or semi-proper transfer function.

Parameters:
  • f[out] Pointer to user’s rc_filter_t struct

  • dt[in] Timestep in seconds

  • num[in] pointer to numerator array

  • numlen[in] The numerator length

  • den[in] pointer to denominator array

  • denlen[in] The denominator length

Returns:

0 on success or -1 on failure.