HP Forums

Full Version: HP Prime: editing a matrix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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.

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.

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.

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.

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

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.

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