| CMSIS-DSP Verison 1.4.1 CMSIS DSP Software Library

- CMSIS
- CORE
- DSP
- RTOS API
- SVD

- Main Page
- Usage and Description
- Reference

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Matrix Subtraction
Matrix Functions

## Functions
arm_status | arm_mat_sub_f32 (const arm_matrix_instance_f32 *pSrcA, const arm_matrix_instance_f32 *pSrcB, arm_matrix_instance_f32 *pDst)
| Floating-point matrix subtraction. More...
arm_status | arm_mat_sub_q15 (const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst)
| Q15 matrix subtraction. More...
arm_status | arm_mat_sub_q31 (const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst)
| Q31 matrix subtraction. More...

## Description

Subtract two matrices.

Subraction of two 3 x 3 matrices

The functions check to make sure that `pSrcA`, `pSrcB`, and `pDst` have the same number of rows and columns.

## Function Documentation

arm_status arm_mat_sub_f32 | ( | const arm_matrix_instance_f32 * | pSrcA,
|  | const arm_matrix_instance_f32 * | pSrcB,
|  | arm_matrix_instance_f32 * | pDst
| ) |  |

Parameters

  [in] | *pSrcA | points to the first input matrix structure
  [in] | *pSrcB | points to the second input matrix structure
  [out] | *pDst | points to output matrix structure

Returns
  The function returns either `ARM_MATH_SIZE_MISMATCH` or `ARM_MATH_SUCCESS` based on the outcome of size checking.

References ARM_MATH_SIZE_MISMATCH, ARM_MATH_SUCCESS, arm_matrix_instance_f32::numCols, arm_matrix_instance_f32::numRows, arm_matrix_instance_f32::pData, and status.

arm_status arm_mat_sub_q15 | ( | const arm_matrix_instance_q15 * | pSrcA,
|  | const arm_matrix_instance_q15 * | pSrcB,
|  | arm_matrix_instance_q15 * | pDst
| ) |  |

Parameters

  [in] | *pSrcA | points to the first input matrix structure
  [in] | *pSrcB | points to the second input matrix structure
  [out] | *pDst | points to output matrix structure

Returns
  The function returns either `ARM_MATH_SIZE_MISMATCH` or `ARM_MATH_SUCCESS` based on the outcome of size checking.

Scaling and Overflow Behavior:

  The function uses saturating arithmetic. Results outside of the allowable Q15 range [0x8000 0x7FFF] will be saturated.

References __SIMD32, ARM_MATH_SIZE_MISMATCH, ARM_MATH_SUCCESS, arm_matrix_instance_q15::numCols, arm_matrix_instance_q15::numRows, arm_matrix_instance_q15::pData, and status.

arm_status arm_mat_sub_q31 | ( | const arm_matrix_instance_q31 * | pSrcA,
|  | const arm_matrix_instance_q31 * | pSrcB,
|  | arm_matrix_instance_q31 * | pDst
| ) |  |

Parameters

  [in] | *pSrcA | points to the first input matrix structure
  [in] | *pSrcB | points to the second input matrix structure
  [out] | *pDst | points to output matrix structure

Returns
  The function returns either `ARM_MATH_SIZE_MISMATCH` or `ARM_MATH_SUCCESS` based on the outcome of size checking.

Scaling and Overflow Behavior:

  The function uses saturating arithmetic. Results outside of the allowable Q31 range [0x80000000 0x7FFFFFFF] will be saturated.

References ARM_MATH_SIZE_MISMATCH, ARM_MATH_SUCCESS, arm_matrix_instance_q31::numCols, arm_matrix_instance_q31::numRows, arm_matrix_instance_q31::pData, and status.