求一个能计算n阶行列式的软件?

来源:百度知道 编辑:UC知道 时间:2024/06/02 02:48:51
最好给个下载地址喽

matlab超级好的软件

我自己写了个
函数up_tri将待求行列式转为上三角行列式
函数det求行列式值
矩阵所有运算我都实现过
想要找我
//Converting given determinant to up-triangle determinant
void up_tri(double m[][MAX],int n)
{
//array m is the pending matrix
//n is the dimension of this matrix
int i,j,e;
double d=1.0;
for(i=1;i<n;i++)
for(e=i;e<n;e++)
{
if(0==m[i-1][i-1]) //If it equals 0, it is unnecessary to operate
break;
d=m[e][i-1]/m[i-1][i-1];
for(j=i-1;j<n;j++)
m[e][j]-=d*m[i-1][j];
}
}

//Calculating the value of given determinant
double det(double m[][MAX],int n)
{
//array m is the pending matrix
//n is the dimension of this matrix
int i,j;
double t=1;
up_tri(m,n); //Converting matrix m to a up-triangle determinant
for(i=0,j=0;i<n;i++,j++)
t*=m[i][j]; //Multiply items on prime diagonal continuously
//obtain the