Post Reply 
Adjoint matrix (my function): ok with numbers but not symbolics
11-10-2017, 07:12 PM (This post was last modified: 11-10-2017 09:36 PM by salvomic.)
Post: #11
RE: Adjoint matrix (my function): ok with numbers but not symbolics
(11-10-2017 07:09 PM)parisse Wrote:  Then adj(m):=adjoint_matrix(m)[2,size(m)]*(-1)^(size(m)-1) should do the job.

ok!
I'll rewrite the whole program for the new FW as a CAS function...

EDIT
This code is all CAS and works after the beta 2017 November 8.
adj(m) Adjoint matrix
cofactors(m) Cofactors matrix -> TRN(adj(m))
minor(m, r, c) a minor of the matrix m, suppressing row r and col c
Code:

// Cofactors matrix
// use programs adj(m) and minor(m,r,c)
#cas
cofactors(m) :=
BEGIN
RETURN TRN(adj(m));
END;
#end

#cas
// Adjoint of a matrix (transpose of cofactor mat)
// after beta 2017 Nov 8
adj(m) :=
BEGIN
RETURN adjoint_matrix(m)[2,size(m)]*(-1)^(size(m)-1);
END;
#end

#cas
// Minor of a matrix
// r row, c col to suppress
minor(m, r,c) :=
BEGIN
  m:= delrows(m,r);
  m:= delcols(m,c);
  RETURN m;
END;
#end

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Adjoint matrix (my function): ok with numbers but not symbolics - salvomic - 11-10-2017 07:12 PM



User(s) browsing this thread: 1 Guest(s)