-  3.39.25
matfaust::proj::const Class Reference

Functor for the CONST projector. More...

Public Member Functions

function const (C, varargin)
 
- Public Member Functions inherited from matfaust::proj::proj_gen
function subsref (self, S)
 

Additional Inherited Members

- Protected Attributes inherited from matfaust::proj::proj_gen
Property constraint
 

Detailed Description

Functor for the CONST projector.

Usage

    const(C): returns a CONST projector (functor), C defines the constant matrix to which the ouptut matrix of projector must be equal (before normalization).
    const(C,'normalized', bool,'pos', bool): the optional parameters are set. By default both normalized and pos are false.

Parameters
'normalized',truenormalizes the projection image according to its Frobenius norm.
'normalized',false(the default) no normalization.
'pos',trueskips the negative values (replaced by zero) of the input matrix.
'pos',false(the default) negative values are not skipped.
Return values
pthe const projector.

Example

>> import matfaust.proj.const
>> rng(42)
>> M = rand(5, 5)
M =
0.3745 0.1560 0.0206 0.1834 0.6119
0.9507 0.0581 0.9699 0.3042 0.1395
0.7320 0.8662 0.8324 0.5248 0.2921
0.5987 0.6011 0.2123 0.4319 0.3664
0.1560 0.7081 0.1818 0.2912 0.4561
>> C = rand(5, 5)
C =
0.7852 0.6075 0.8084 0.1220 0.6625
0.1997 0.1705 0.3046 0.4952 0.3117
0.5142 0.0651 0.0977 0.0344 0.5201
0.5924 0.9489 0.6842 0.9093 0.5467
0.0465 0.9656 0.4402 0.2588 0.1849
>> p = const(C);
>> p(M)
ans =
0.7852 0.6075 0.8084 0.1220 0.6625
0.1997 0.1705 0.3046 0.4952 0.3117
0.5142 0.0651 0.0977 0.0344 0.5201
0.5924 0.9489 0.6842 0.9093 0.5467
0.0465 0.9656 0.4402 0.2588 0.1849
>>

Constructor & Destructor Documentation

◆ const()

function matfaust::proj::const::const ( ,
varargin   
)

The documentation for this class was generated from the following file:
matfaust::proj
This module provides matrix projectors.
Definition: +proj/@anticirc/anticirc.m:1
matfaust
The FAuST Matlab Wrapper
Definition: bsl.m:1
matfaust::proj::const::const
function const(C, varargin)
matfaust::proj::const
Functor for the CONST projector.
Definition: const.m:110
matfaust::rand
function rand(M, N, varargin)
Generates a random Faust.