Modf
Overview
Computes the function [f,n] = modf(x) using the math library
Discussion
Computes the funtion modf(x, n) using the math library. The function separates a floating-point value into separate integer and fractional portions.
Module Pack
Standard
ClassID
classID = 56
Type Definition
typedef struct _ModuleModf
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
} ModuleModfClass;
Pins
Input Pins
| Name | x |
| Description | Input signal x |
| Data type | float |
| Channel range | Unrestricted |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real |
Output Pins
| Name | f |
| Description | Fraction component f |
| Data Type | float |
| Name | n |
| Description | Integer component n (as a floating-point value) |
| Data Type | float |
Matlab Usage
File Name: modf_module.m
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.
Copyright (c) 2026 DSP Concepts, Inc.