Post Reply 
Programming Question: How do you augment one matrix with another?
07-03-2014, 06:40 PM (This post was last modified: 07-05-2014 07:01 PM by Jsather.)
Post: #10
RE: Programming Question: How do you augment one matrix with another?
(07-02-2014 07:01 PM)parisse Wrote:  
(07-02-2014 05:59 PM)Jsather Wrote:  Parisse: Could you give an explicit example of what you meant by "[op(M1),op(M2)] glues two matrices together", preferably that works in a program? I don't understand.
Just write [op(m1),op(m2)] and see what you get. This works of course in CAS and CAS programs.
op removes the [] delimiters of the matrix, you get the sequence of the matrix rows, the comma concatenates the rows of m1 and m2 and [] brings back the matrix delimiter.

In CAS mode I typed [op(M1),op(M2)] as Parisse suggested, and it returns a list of two matrices rather than an augmented matrix. However, I typed m3:=concat(op(M1),op(M2)) and it returned the matrix that is the vertical augmentation of M2 to M1 in list format meaning [[row 1],[row 2],...,[row n]]. Type(m3) in CAS mode returns DOM_List. Type(m3) in Home mode returns 6, i.e. a list.

In Home mode or in an HP Prime program, concat(CAS.op(M1),CAS.op(M2)) returns {op([M1]),op[M2])}, a list. By "op" I mean the letters op are displayed. By [M1] and [M2] I mean the M1 and M2 matrices are listed out in a mode determined by the Textbook Display checkbox in Home Settings. In other words, concat(CAS.op(M1),CAS.op(M2)) does not augment M2 to M1 in home mode or in an HP Prime program.

No matter what else, it is always interesting to learn of "gosh, where is that documented" functionality such as op(M1) or M1(-c). I, for one, am new to CAS and HP for that matter and find the CAS documentation in the user manual inadequate. Maybe someone reading this can show me how to use op(matrix) in an HP Prime program.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming Question: How do you augment one matrix with another? - Jsather - 07-03-2014 06:40 PM



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