Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

Overview

Computes the function [f,n] = modf(x) using the math library

Discussion

Computes the function modf(x, n) using the math library. The function separates a floating-point value into separate integer and fractional portions.

Type Definition

Code Block
typedef struct _ModuleModf
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
} ModuleModfClass;

Pins

Input Pins

Name: x

Description: Input signal x

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: f

Description: Fraction component f

...

Description: Integer component n (as a floating-point value)

Data type: float

MATLAB Usage

File Name: modf_module.m

Code Block
 M=modf_module(NAME)
 Creates an Audio Weaver module that computes the function [f, n] = modf(x)
 using the math library.  The function separates the value X into a fractional
 (F) and integer portion (N).  Both outputs are floating-point values.
    NAME - name of the module.

...