⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matinverseverify.c

📁 C语言实现复数型矩阵求逆
💻 C
字号:
#include "MatrixInverse.h"

int main()
{
	floatComplexMatrix *mat;
	floatComplexMatrix *matInverse;
	floatComplexMatrix *I;

	mat=floatComplexMatrixAlloc(3,3);
	mat->a[0][0]=floatComplexSet(1.0,1.0);
	mat->a[0][1]=floatComplexSet(2.0,1.0);
	mat->a[0][2]=floatComplexSet(3.0,2.0);
	mat->a[1][0]=floatComplexSet(4.0,2.0);
	mat->a[1][1]=floatComplexSet(5.0,1.0);
	mat->a[1][2]=floatComplexSet(2.0,7.0);
	mat->a[2][0]=floatComplexSet(3.0,8.0);
	mat->a[2][1]=floatComplexSet(9.0,1.0);
	mat->a[2][2]=floatComplexSet(3.0,2.0);
	printf("The original Matrix A:\n");
	floatPrintComplexMatrix(mat);
	matInverse=floatComplexMatrixInverse(mat);
	printf("The Inverse of matrix A:\n");
	floatPrintComplexMatrix(matInverse);
	I=floatComplexMatrixMpy(mat,matInverse);
	printf("A*A^(-1):\n");
	floatPrintComplexMatrix(I);
	floatComplexMatrixFree(mat);
	floatComplexMatrixFree(matInverse);
	
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -