Matrix references

08222015, 01:18 PM
Post: #1




Matrix references
How would you efficiently replace a column vector of a matrix, with another column vector, of suitable dimension?
Example: a:=[[−1,5],[2,5]]; replace column 2 with [3 4] ==> [[−1,3],[2,4]] Ideally, the same approach will work in HOME or CAS. 

08222015, 03:02 PM
Post: #2




RE: Matrix references
This seems to work in cas and home on the emulator:
Code: #cas 

08222015, 04:09 PM
Post: #3




RE: Matrix references
(08222015 03:02 PM)roadrunner Wrote: This seems to work in cas and home on the emulator: thank you, Road, this' helpful also for me! simple enough ciao Salvo ∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C  DM42 WP34s :: Prime Soft. Lib 

08242015, 05:23 AM
Post: #4




RE: Matrix references
Hello,
In HOME only, Mat[Column]:=vector will do it in one go... Mat[column] will return a column. cyrille 

08242015, 11:59 AM
Post: #5




RE: Matrix references
The responses provided reveal many of the shortcoming's in Prime's ability to deal with matrices. The burden of column replacement using support functions such as DELCOL(), ADDCOL(), and REPLACE(), make difficult what should be quite a simple operation.
The socalled, "dichotomy," HOME vs. CAS, renders useless, what COULD be a useful solution to this problem: Mat[Column]:=vector, when matrices contain symbolic entries. Negative indices are not supported in CAS. For example, replacing column 2 of matrix a, with vector b, isn't supported in HOME mode, even by using Mat[Column]:=vector, when: a:=[[x2,x1],[x3,x2],[x3,x4]]; // Symbolic entries not allowed in HOME b:=[[x1],[x2],[x1]]; My original post attempts to emphasize the current weakness, (and encourage further development), in matrix handling methods; within 'both' sides of the HOME / CAS status quo. Understandably, the Primes's authors have much to do, as the Prime undergoes evolution. May I request that improvement in matrix handling be added to "the list?" Thanks! Dale 

08242015, 02:47 PM
Post: #6




RE: Matrix references
So out of curiosity, what is the 50g sequence for doing this? I remember from long before my HP time trying to do a similar thing on the 48 series was pretty painful too.
TW Although I work for the HP calculator group, the views and opinions I post here are my own. 

08242015, 03:22 PM
Post: #7




RE: Matrix references
Quote:what is the 50g sequence for doing this matrix column COL DROP vector column COL+ is one way 

08242015, 03:35 PM
Post: #8




RE: Matrix references
Personally, I would prefer to see an external compiler/debugger so just the compiled programs can be stored on the handheld and the source code can remain on my PC.
Presumably, with large amounts of requests and limited resources, HP will decide which requests to work on based on what they think will sell the most calculators. 

08242015, 04:28 PM
(This post was last modified: 08242015 04:30 PM by Gerald H.)
Post: #9




RE: Matrix references
(08242015 02:47 PM)Tim Wessman Wrote: So out of curiosity, what is the 50g sequence for doing this? I remember from long before my HP time trying to do a similar thing on the 48 series was pretty painful too. I think these two progs do the job Stack: Mat Vec R/C Number V2C, Vector to Column « 1 SWAP 2 >LIST SWAP TRN REPL » V2R, Vector to Row « 1 2 >LIST SWAP REPL » 

« Next Oldest  Next Newest »

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