adding a row to a matrix with variable
|
06-25-2014, 06:48 PM
(This post was last modified: 06-25-2014 07:28 PM by Rich.)
Post: #1
|
|||
|
|||
adding a row to a matrix with variable
Hi,
Is it possible to add a row to a matrix that has a variable in it? I am able to add a row to a 2x2 matrix using this addrow(a1,[1,3],2) resulting in [[0,0],[1,3]] If i add a variable to to the line (example below) it gives me a "Error bad argument type"? I am trying to set the variable as a real or integer, but I am still getting the same results. addrow(a1,[1,k],2) resulting in "Error: Bad argument type" EDIT:: Initially a1:=[[0,0]] Thank you, |
|||
06-26-2014, 05:49 AM
Post: #2
|
|||
|
|||
RE: adding a row to a matrix with variable
Hello,
you might be able to do somehting like that in CAS mode, but not in home/program which are numerical and to not support symbolic matrices. cyrille |
|||
06-26-2014, 03:08 PM
Post: #3
|
|||
|
|||
RE: adding a row to a matrix with variable
Off topic but related: Why is the row/col number in ADDROW and ADDCOL not optional? I'm sure 100% of us assume if you left it out, the prime would just append the specified row or column on the end. As it is, absence of row/col number generates a syntax error.
This would be a low maintenance change, completely backwards compatible, and certainly an improvement. Just hoping the right people notice and deem it worthy of addition to the revision suggestion list. |
|||
06-26-2014, 04:05 PM
(This post was last modified: 06-26-2014 04:06 PM by Rich.)
Post: #4
|
|||
|
|||
RE: adding a row to a matrix with variable
I am not sure, but the xcas documentation also requires a 3 argument function, the third being the row or column number : \
As a side note, the addrow, addcol function, specifically with a variable, doesn't appear to work in CAS. It does work only if the variable is assigned a real value though. Perhaps there is another way i can do this, sigh, and back to the CAS manual. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)