Matrix in a program
|
10-27-2020, 07:37 PM
Post: #3
|
|||
|
|||
RE: Matrix in a program
Hello
Thanks very much for your help. First I tried with the system #cas / #end, and ImpGa(matrix) gives the same as in XCas: [[1,0,x1-2*x3],[0,1,x3],[0,0,-2*x1+x2+3*x3],[0,0,-x1+x4],[0,0,3*x3+x5]] Following also the suggested corrections (not including variable column which really has not sense at all): #cas //Implicit ecuations by Gaus ImpGa(Ma1):= BEGIN //d-dimension , c-column dimension //n-actual column , r-row search LOCAL d,c,n,r,Ma2; c:=colDim(Ma1); n:=1; FOR n FROM 1 TO c-1 DO //Search for 1 in col n r:=col(Ma1,n); // RETURN r; r:=POS(r,1); IF r==0 THEN r:=n; ELSE IF r≠n THEN SWAPROW(Ma1,r,n); END; END; Ma1:=pivot(Ma1,n,n); END; RETURN Ma1; END; #end I do not know if this is my interpretation, but the ImpGa() function has disappear from the "User" menu and has gone to the "Catlg" menu. Possibly all CAS functions go to general catalog. This raises the question if it is possible to group CAS functions. I have to practice much more. Thanks again to all Toni |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Matrix in a program - Tonig00 - 10-26-2020, 10:21 PM
RE: Matrix in a program - Albert Chan - 10-27-2020, 02:28 AM
RE: Matrix in a program - Tonig00 - 10-27-2020 07:37 PM
RE: Matrix in a program - Tonig00 - 10-27-2020, 07:59 PM
|
User(s) browsing this thread: 1 Guest(s)