特别说明:完整45期数字信号处理教程,原创高性能示波器代码全开源地址:链接 第19章 MatrixFunctions的使用(一) 9 G! X' T6 R( X3 r) o$ p: j( ^' ~ 本期教程主要讲解矩阵运算中的初始化,加法,逆矩阵和减法。 19.1 矩阵初始化 MatInit 19.2 矩阵加法 MatAdd 19.3 逆矩阵 MatInverse 19.4 矩阵减法 MatSub 19.5 总结 0 O/ ^0 Z* j) l A1 J19.1 矩阵初始化 MatInit19.1.1 arm_mat_init_f32 函数定义如下: void arm_mat_init_f32( arm_matrix_instance_f32 * S, uint16_t nRows, uint16_t nColumns, float32_t * pData) 参数定义: [in,out] *S points to an instance of the floating-point matrix structure. [in] nRows number of rows in the matrix. [in] nColumns number of columns in the matrix. [in] *pData points to the matrix data array. 注意事项: 1. arm_matrix_instance_f32的结构体定义如下(在文件arm_math.h文件里面): typedef struct { uint16_t numRows; // number of rows of the matrix. uint16_t numCols; // number of columns of the matrix. float32_t *pData; // points to the data of the matrix. } arm_matrix_instance_f32; $ F2 E" B# I+ {1 j2 t) V2 r# v19.1.2 arm_mat_init_q31 函数定义如下: void arm_mat_init_q31( arm_matrix_instance_q31 * S, uint16_t nRows, uint16_t nColumns, q31_t * pData) 参数定义: [in,out] *S points to an instance of the floating-point matrix structure. [in] nRows number of rows in the matrix. [in] nColumns number of columns in the matrix. [in] *pData points to the matrix data array. 注意事项: 1. arm_matrix_instance_q31的结构体定义如下(在文件arm_math.h文件里面): typedef struct { uint16_t numRows; // number of rows of the matrix. uint16_t numCols; // number of columns of the matrix. q31_t *pData; // points to the data of the matrix. } arm_matrix_instance_q31; 19.1.3 arm_mat_init_q15 函数定义如下: void arm_mat_init_q15( arm_matrix_instance_q15 * S, uint16_t nRows, uint16_t nColumns, q15_t * pData) 参数定义: [in,out] *S points to an instance of the floating-point matrix structure. [in] nRows number of rows in the matrix. [in] nColumns number of columns in the matrix. [in] *pData points to the matrix data array. 注意事项: 1. arm_matrix_instance_q15的结构体定义如下(在文件arm_math.h文件里面): typedef struct { uint16_t numRows; // number of rows of the matrix. uint16_t numCols; // number of columns of the matrix. q15_t *pData; // points to the data of the matrix. } arm_matrix_instance_q15; * p& h$ s: k8 [: E7 r19.1.4 实例讲解 实验目的: 1. 学习MatrixFunctions中矩阵的初始化 实验内容: 1. 按下按键K1, 串口打印函数DSP_MatInit的输出结果 实验现象: 通过窗口上位机软件SecureCRT(V5光盘里面有此软件)查看打印信息现象如下: 程序设计:
|
: X7 F) @ p; {+ u$ T" B' R: N; a
19.2.1 arm_mat_add_f32
19.2.2 arm_mat_add_q31
19.2.3 arm_mat_add_q15
19.2.4 实例讲解
3 m3 p* O* ~8 _4 s1 N
, z' }) g2 Y3 C* R# U
19.3.1 arm_mat_inverse_f32
% Q+ h- Z, W; [
19.4.1 arm_mat_sub_f32
19.4.2 arm_mat_add_q31
! X* Q, m2 K7 D; A+ s4 z
19.4.3 arm_mat_add_q15
# [ ~; |( t y
19.4.4 实例讲解
' p) T/ ?: M8 T
谢谢分享~
说起来这些板子都挺贵orz