Post Reply 
Bad argument type, DET(M9)/M8(2,1) in App
01-16-2016, 06:54 AM
Post: #5
RE: Bad argument type, DET(M9)/M8(2,1) in App
(01-15-2016 05:13 PM)Han Wrote:  
(01-15-2016 10:48 AM)toshk Wrote:  ..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
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.

Use M25[c,j]:=L1(j) instead. From a syntax point of view, no one would know whether you are creating a CAS function named M25 or if you are referring to the cell of a matrix named M25 because the syntax looks exactly the same. Therefore, to avoid ambiguity, use the square brackets for matrices since functions cannot be defined using square brackets.
....thanks Han!!
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-16-2016 06:54 AM

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