grzegorzmazur / yacas

Computer calculations made easy
http://www.yacas.org
GNU Lesser General Public License v2.1
126 stars 24 forks source link

SymbolicDeterminant fail if variable i has a value. #321

Closed Isomorph70 closed 4 years ago

Isomorph70 commented 4 years ago

[i:=5;SymbolicDeterminant(Identity(3));];

Isomorph70 commented 4 years ago

Adding an 'i' to Local seem to help.

20 # SymbolicDeterminant(_matrix) <-- [ Local(perms,indices,result,i); Check((IsMatrix(matrix)),"Determinant: Argument must be a matrix"); indices:=Table(i,i,1,Length(matrix),1); perms:=Permutations(indices); result:=0; ForEach(item,perms) result:=result+Product(i,1,Length(matrix),matrix[i][item[i] ]) * LeviCivita(item); result; ];

grzegorzmazur commented 4 years ago

Thanks, it seems to be the fix, I'll push fix that tomorrow.

Cheers, Grzesiek