Matrix 1-Norm
Compute 1-norm of matrix
Libraries:
DSP System Toolbox /
Math Functions /
Matrices and Linear Algebra /
Matrix Operations
Description
The Matrix 1-Norm block computes the 1-norm or maximum column-sum of an M-by-N input matrix A.
Equivalent MATLAB® code is given by:
y = max(sum(abs(A)))
Examples
Compute Maximum Column Sum of Matrix
Simulink® model example that shows how to calculate the max column sum of a matrix.
Ports
Input
Port_1 — Input signal
vector | matrix
Input signal, specified as a vector or matrix.
The block treats length-M unoriented vector input as an M-by-1 matrix.
The Matrix 1-Norm block supports real and complex floating-point inputs and real fixed-point inputs.
Data Types: single
| double
| int8
| int16
| int32
| uint8
| uint16
| uint32
| fixed point
Complex Number Support: Yes
Output
Port_1 — Output signal
scalar
Matrix 1-norm or maximum column-sum of the input, returned as a scalar. The output y is always a scalar.
Data Types: single
| double
| int8
| int16
| int32
| uint8
| uint16
| uint32
| fixed point
Parameters
Main
There are no parameters on the Main Tab.
Data Types
Rounding mode — Method of rounding operation
Floor
(default) | Ceiling
| Convergent
| Nearest
| Round
| Simplest
| Zero
Specify the rounding mode for fixed-point operations as one of the following:
Floor
Ceiling
Convergent
Nearest
Round
Simplest
Zero
For more details, see Rounding Modes.
Note
The Rounding mode and Saturate on integer overflow parameters have no effect on numerical results when all these conditions are met:
Accumulator data type is
Inherit: Inherit via internal rule
.Output data type is
Inherit: Same as accumulator
.
With these data-type settings, the block operates in a full-precision mode.
Saturate on integer overflow — Overflow handling method
off (default) | on
Select this parameter to saturate the result of the fixed-point operation. Clear this parameter to wrap the result of the fixed-point operation. For details on saturate and wrap, see Overflow Handling for fixed-point operations.
Note
The Rounding mode and Saturate on integer overflow parameters have no effect on numeric results when all these conditions are met:
Product output data type is
Inherit: Inherit via internal rule
.Accumulator data type is
Inherit: Inherit via internal rule
.
With these data-type settings, the block operates in a full-precision mode.
Accumulator — Accumulator data type
Inherit: Inherit via internal
rule
(default) | Inherit: Same as input
| fixdt([],16,0)
Accumulator specifies the data type of the output of an accumulation operation in the Matrix 1-Norm block.
Inherit: Inherit via internal rule
— The block inherits the accumulator data type based on an internal rule. For more information on this rule, see Inherit via Internal Rule.Inherit: Same as input
— The block specifies the accumulator data type to be the same as the input data type.fixdt([],16,0)
— The block specifies an autosigned, binary-point, scaled, fixed-point data type with a word length of 16 bits and a fraction length of 0.
Alternatively, you can set the Accumulator data type by using the Data Type Assistant. To use the assistant, click the Show data type assistant button.
For more information on the data type assistant, see Specify Data Types Using Data Type Assistant (Simulink).
For illustrations on how to use the accumulator data type in this block, see Fixed-Point Data Types.
Output — Output data type
Inherit: Same as
accumulator
(default) | Inherit: Same as input
| fixdt([],16,0)
Output specifies the data type of the output of the Matrix 1-Norm block.
Inherit: Same as input
— The block specifies the output data type to be the same as the input data type.Inherit: Same as accumulator
— The block specifies the output data type to be the same as the accumulator data type.fixdt([],16,0)
— The block specifies an autosigned, binary-point, scaled, fixed-point data type with a word length of 16 bits and a fraction length of 0.
Alternatively, you can set the Output data type by using the Data Type Assistant. To use the assistant, click the Show data type assistant button.
For more information on the data type assistant, see Specify Data Types Using Data Type Assistant (Simulink).
For more information on the output data type, see Fixed-Point Data Types.
Output Minimum — Minimum value that block can output
[]
(default) | scalar
Specify the minimum value the block can output. Simulink uses this minimum value to perform:
Simulation range checking. See Specify Signal Ranges (Simulink).
Automatic scaling of fixed-point data types.
Output Maximum — Maximum value that block can output
[]
(default) | scalar
Specify the maximum value the block can output. Simulink uses this maximum value to perform:
Simulation range checking. See Specify Signal Ranges (Simulink).
Automatic scaling of fixed-point data types.
Lock data type settings against changes by the fixed-point tools — Prevent fixed-point tools from overriding data types
off
(default) | on
Select this parameter to prevent the fixed-point tools from overriding the data types you specify in the block dialog box.
Note
Floating-point inheritance takes precedence over the data type settings defined on this tab. When inputs are floating point, the block ignores these settings and all internal data types are floating point.
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
More About
Fixed-Point Data Types
This diagram shows the data types used within the Matrix 1-Norm block for fixed-point signals.
The block calculations are all done in the accumulator data type until the
max
operation is performed. The result is then cast to the
output data type. You can set the accumulator and output data types in the block
dialog box.
References
[1] Golub, G. H., and C. F. Van Loan. Matrix Computations. 3rd ed. Baltimore, MD: Johns Hopkins University Press, 1996.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)