Bad argument type, DET(M9)/M8(2,1) in App
|
01-14-2016, 11:04 AM
Post: #1
|
|||
|
|||
Bad argument type, DET(M9)/M8(2,1) in App
eg1. how([1,4,3,2,1,4,4])--> Error: Bad argument type, M0(B,A):=-DET(M9)/M8(2,1) cant be executed.
eg2. how([1,4,k,2,1,4,4])-> expecting [1,k,1,4] into M0 but Error: Bad argument type Code:
|
|||
01-15-2016, 07:43 AM
Post: #2
|
|||
|
|||
RE: Bad argument type, DET(M9)/M8(2,1) in App
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 Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP. |
|||
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,..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. |
|||
01-15-2016, 05:13 PM
(This post was last modified: 01-15-2016 05:14 PM by Han.)
Post: #4
|
|||
|
|||
RE: Bad argument type, DET(M9)/M8(2,1) in App
(01-15-2016 10:48 AM)toshk Wrote:(01-15-2016 07:43 AM)cyrille de brébisson Wrote: Hello,..Thanks Cyrille, 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. Graph 3D | QPI | SolveSys |
|||
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:....thanks Han!!(01-15-2016 10:48 AM)toshk Wrote: ..Thanks Cyrille, |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)