# decayFilter(a,decayRate)

Implements a filter whose response is based on a given decay rate.

### Syntax

o_decayFilter(a,decayRate)
  a: waveform - input waveform
  decayRate: numeric - decay rate in percentage
  return: waveform- input transformed by the decay-based filter

### Usage

Typical usage is to model a diode-RC detector, but can be used in any case where the output signal is a decayed version of the input signal.

### Location

menu: veeos ==> Signal processing ==> Modules ==> decayFilter

library: sigLib

### Example

### Notes

A very basic nonlinear filter can be implemented with a diode and a capacitor. The capacitor provides charge storage (i.e. memory) and the diode provides charges to the capacitor in one direction only (i.e. charges cap but doesn't discharge it). This provides a non-linear filter such that it follows a rising input but the output decays at a specified rate(so-called slew rate). A typical use for this is for recovering an envelope from an AM-modulated signal.

### Reference

### Dependencies

### Supported On

VEE 7.0+, all platforms

### See Also

analogFilter, envelope

© 2015-2017. All Rights Reserved. Stan Bischof (stan@worldbadminton.com). Last updated 24 February 2017 08:58.