Bad argument type, DET(M9)/M8(2,1) in App
01-16-2016, 06:54 AM
Post: #5
 toshk Member Posts: 195 Joined: Feb 2015
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
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.

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!!
 « Next Oldest | Next Newest »

 Messages In This Thread Bad argument type, DET(M9)/M8(2,1) in App - toshk - 01-14-2016, 11:04 AM RE: Bad argument type, DET(M9)/M8(2,1) in App - cyrille de brĂ©bisson - 01-15-2016, 07:43 AM RE: Bad argument type, DET(M9)/M8(2,1) in App - toshk - 01-15-2016, 10:48 AM RE: Bad argument type, DET(M9)/M8(2,1) in App - Han - 01-15-2016, 05:13 PM 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)