Square
Overview
Squares samples
Discussion
Computes the square of all input samples using the math library. This module support an aribtrary number of channels, and each channel is squared individually.
Module Pack
Standard
ClassID
classID = 64
Type Definition
typedef struct _ModuleSquare
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
} ModuleSquareClass;
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: square_module.m
M=square_module(NAME)
Creates an Audio Weaver module that squares all samples. The module
supports an arbitrary number of channels and each channel is individually
squared.
Arguments:
NAME - name of the module.
Copyright (c) 2026 DSP Concepts, Inc.