Hi all !!

I'm trying to create a determinant code in Maple, or to find how the determinant is coded in the library.

I had a look on the internet but didn't find anything, could anyone help me ?

Printable View

- December 11th 2011, 06:10 PMmartinouDeterminant in Maple
Hi all !!

I'm trying to create a determinant code in Maple, or to find how the determinant is coded in the library.

I had a look on the internet but didn't find anything, could anyone help me ? - December 11th 2011, 06:20 PMpickslidesRe: Determinant in Maple
Maple has its own function you can call, but i'm guessing you want to write one yourself?

Is your matrix a fixed order? - December 11th 2011, 06:39 PMmartinouRe: Determinant in Maple
Yes, you're right, I need a code, either mine or not, it even may be in Maple's library, but I need the explicit code so as to be able to explain it and how it works.

It must be for any matrix order (I could for n<=4, but further i think I'd be quickly lost, and for any size, I don't manage ...) - December 11th 2011, 06:50 PMpickslidesRe: Determinant in Maple
If you need only to code it for 2x2, 3x3 or 4x4 then your function could have the matrix as the input, firstly it should find the order, if the order is not 2x2, 3x3 or 4x4 then return an error message other wise find the determinant using hardcoded calcs and the matrix elements.

Psuedo Code could be:

Input Matrix

Find Order (count rows, count columns) for mxn matirx

If m not equal to n or n,m >4, return an error

Else

Find deteminant

if m=2, then a11*a22-a12*a21

if m=3, then a11*(a22*a33-a32*a23)+...

if m=4, then ..... - December 11th 2011, 07:00 PMmartinouRe: Determinant in Maple
Yeah, but I need the code to be applyable for ANY order, and will probably have to give an exemple with dim(M)=10.

There's no way I code all possibilities from 1 to 10 ... =S