在MATLAB中计算复数共轭转置 |
您所在的位置:网站首页 › 代币是什么意思南京话 › 在MATLAB中计算复数共轭转置 |
在MATLAB中计算复数共轭转置
矩阵的复数共轭转置是通过对原矩阵进行转置,然后对每个元素应用复数的复数共轭特性而得到的矩阵。在数学上,这也被称为矩阵的赫米特转置。 MATLAB提供了两种计算矩阵的复共轭转置的方法。 1.’ 操作符 2.ctranspose函数。 让我们通过例子来看看这两者的用法。 方法1:使用’ 操作符语法: vec_B = vec_A’示例 1: % MATLAB code for ' Operator vecA = [1+2i 3+3.1i 4-1i; 2-0.1i -4i 0.4; 1i 0.23-1i 23+31i]; %matrix % Displaying the original matrix disp("Original Matrix") disp(vecA) % Computing the complex conjugate transpose of vecA vecB = vecA'; % Displaying the complex conjugate transpose disp("Complex Conjugate Transpose of vecA") disp(vecB)输出: ctranspose()函数与’运算符的工作相同,只是它能对类进行运算符重载。 % MATLAB code for ctranspose() vecA = [1+2i 3+3.1i 4-1i; 2-0.1i -4i 0.4; 1i 0.23-1i 23+31i]; %matrix % Displaying the original matrix disp("Original Matrix") disp(vecA) % Computing the complex conjugate transpose of vecA vecB = ctranspose(vecA); % Displaying the complex conjugate transpose disp("ctranspose of vecA") disp(vecB)输出: 可以验证的是,两种方法的输出结果完全相同。 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |