HP Forums
HP Prime: editing a matrix - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: HP Prime: editing a matrix (/thread-256427.html)



HP Prime: editing a matrix - Alberto Candel - 11-19-2013

In CAS, if I copy and paste a matrix to the input line, it shows with and extra row at the bottom and an extra column on the right with +/- signs that allow for quickly adding an extra bottom row or right column.

Is there a quick way of adding an extra top row or extra left column to an existing matrix? Or an extra row or column anywhere for that matter? I could not find that in the user's guide.

Thank you.


Re: HP Prime: editing a matrix - Eddie W. Shore - 11-19-2013

ADDROW.

Syntax: ADDROW(matrix name, vector, row number);

In the programming editor, find it by Cmds, 3. Matrix, 3. ADDROW

This changes the matrix permanently.


Edited: 19 Nov 2013, 10:31 p.m.


Re: HP Prime: editing a matrix - Joe Horn - 11-19-2013

Quote:
Is there a quick way of adding an extra top row or extra left column to an existing matrix? Or an extra row or column anywhere for that matter? I could not find that in the user's guide.

To add a row or column anywhere OTHER than the top or left edge, put the cursor on the +/- sign and press the + key. Press the - key to delete the row or column. That's what the "+/-" stands for. Unfortunately this method doesn't seem able to add a row to the top or a column to the left edge.

One easy way to add a row to the top, or a column to the left edge, is to use the Matrix Editor (Shift 4). If you have a matrix named something other than M0 through M9, you can use the Matrix Editor on it via the Memory Manager (Shift Toolbox). Your variable will be in either the User Variables or CAS Vars list, depending on whether you created in in Home or CAS, respectively.

One benefit of the Matrix Editor over doing it in the edit line is that the Matrix Editor fills new rows and columns with zeros, so you don't have to fill them all in to get a valid matrix. The edit line method only inserts place holders, and you have to fill them all in or you'll get a syntax error.


Re: HP Prime: editing a matrix - Alberto Candel - 11-20-2013

Quote:

One benefit of the Matrix Editor over doing it in the edit line is that the Matrix Editor fills new rows and columns with zeros, so you don't have to fill them all in to get a valid matrix. The edit line method only inserts place holders, and you have to fill them all in or you'll get a syntax error.



well, I found a matrix in my CAS variables, hit the [edit] soft menu, and my HP crashed.


Re: HP Prime: editing a matrix - cyrille de Brébisson - 11-20-2013

Hello,

Quote:
Syntax: ADDROW(matrix name, vector, row number);
In the programming editor, find it by Cmds, 3. Matrix, 3. ADDROW
This changes the matrix permanently.

you can also replace matrixName by a matrix and it will also work and return the modified matrix. so, you do not have to modify the matrix.

cyrille


Re: HP Prime: editing a matrix - Alberto Candel - 11-20-2013

The "crash" seems to have happened before with EDITMAT.

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv021.cgi?read=251382

I wonder if the issue has been resolved. Somehow the HP prime is not off completely (the screen is dark, but there seems to be some "light"). It does not respond to the [ON]-[Symb] reset, only to the back-hole reset.


Re: HP Prime: editing a matrix - Helge Gabert - 11-20-2013

The issue(s) could be resolved with a ROM update ;)