Reciprocal
Overview
Computes the reciprocal (1/x) on a sample-by-sample basis
Discussion
Generates the reciprocal of the input signal on a sample-by-sample basis. $out[n]=\frac{\displaystyle 1}{\displaystyle in[n]}$ Note that the module does not do any input checking and if the input is 0 then the output will be NaN.
Type Definition
typedef struct _ModuleReciprocal
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
} ModuleReciprocalClass;
Pins
Input Pins
Name: in
Description: Input signal
Data type: float
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: Output signal
Data type: float
MATLAB Usage
File Name: reciprocal_module.m
M=reciprocal_module(NAME)
Creates a module that produces the reciprocal of the input signal
for use with the Audio Weaver. Arguments:
NAME - name of the module.