Post Reply 
Bad argument type, DET(M9)/M8(2,1) in App
01-15-2016, 10:48 AM
Post: #3
RE: Bad argument type, DET(M9)/M8(2,1) in App
(01-15-2016 07:43 AM)cyrille de brĂ©bisson Wrote:  Hello,

The problem here is that the result of the -DET(M9)/M8(2,1) is not a number, it's a fraction. And this symbolic object can not be stored in a purely numerical 'Home) matrix (M0).

Your program does mix CAS and Home, which, despite being ok in lots of cases, can sometimes lead to strange things.

My #1 advice would be to use CAS variables rather than home variables for your CAS programs.
If you do want to store the data in a home variables, add an evalf around the -DET(M9)/M8(2,1) code: M0(B,A):=evalf(-DET(M9)/M8(2,1));
and it should work.

cyrille
..Thanks Cyrille,
there is problem of defining a especially matrix under CAS variables....say , M25:=makemat(n,rw);
FOR j FROM 1 TO length(L1) DO
M25(c,j):=L1(j);
END;
Prime seems to have a hard time defining M25 as a matrix, instead it defines M25 as a function(M25(c,j)). hence i am forced to used Home variables M0 instead which would not work on how([1,4,k,2,1,4,4]) containing a variable k for symbolic manipulation under CAS.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Bad argument type, DET(M9)/M8(2,1) in App - toshk - 01-15-2016 10:48 AM



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