特别说明:完整45期数字信号处理教程,原创高性能示波器代码全开源地址:链接 第19章 MatrixFunctions的使用(一) 2 K2 v3 A0 k, B6 y4 j 本期教程主要讲解矩阵运算中的初始化,加法,逆矩阵和减法。 19.1 矩阵初始化 MatInit 19.2 矩阵加法 MatAdd 19.3 逆矩阵 MatInverse 19.4 矩阵减法 MatSub 19.5 总结 % N3 |4 A& q: d* I% Q0 e19.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; 5 O" N( b8 c7 Y19.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; 6 U0 r; J# H1 n& s! |5 P$ ~2 r19.1.4 实例讲解 实验目的: 1. 学习MatrixFunctions中矩阵的初始化 实验内容: 1. 按下按键K1, 串口打印函数DSP_MatInit的输出结果 实验现象: 通过窗口上位机软件SecureCRT(V5光盘里面有此软件)查看打印信息现象如下: 程序设计:
|
19.2.1 arm_mat_add_f32
19.2.2 arm_mat_add_q31
19.2.3 arm_mat_add_q15
19.2.4 实例讲解
e0 b& ? U( C4 F+ r0 [6 A" Z5 P
19.3.1 arm_mat_inverse_f32
19.4.1 arm_mat_sub_f32
19.4.2 arm_mat_add_q31
19.4.3 arm_mat_add_q15
6 h& c, ] z4 M2 V# G7 j1 F
19.4.4 实例讲解
, v* K& ^9 J, e6 R
谢谢分享~3 e5 ]2 J3 d; z4 k; O0 V8 v
说起来这些板子都挺贵orz