HP Forums

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

Hi,

I've updated to the latest firmware and am seeing behavior I don't understand.

The help documentation for MAKEMAT says that MAKEMAT(I+J-1,2,3) should create a 2x3 matrix of integers, but the I get is [[1+J-1,1+J-1,1+J-1][2+J-1,2+J-1,2+J-1]]. I've tried typing the command and executing the command from the help entry (example 3).

Any idea what's going on?

thank you,

Jeff

You need to run it in the Home screen.

Try in CAS MAKEMAT('I+J-1',2,3)

When I do that, I get a message box saying "Error: Syntax Error".

I ran the command MAKEMAT(I+J-1,2.3) in the CAS and got the weird result with the J's. I expected the J's to be replaced by column numbers.

When I run the command in the CAS with the expression quoted, MAKEMAT('I+J-1',2.3), I get the same result.


Edited: 9 Dec 2013, 8:12 p.m.

Curious. Works fine on my Prime in the Home screen with the updated firmware. Try resetting your Prime with On Symb and see if anything changes.

Edited: 9 Dec 2013, 8:23 p.m.

I reset the calc with F-C-O + paperclip, then reformatted the flash drive, to put the device in a known state.

Then I searched the help for MAKEMAT, selected example 3, and pressed enter. This resulted a syntax error on the home screen and the business with the J's on the CAS screen.

However, when I manually entered MAKEMAT(I+J-1,2,3) on the home and CAS screens, I did get the expected result [[1,2,3],[2,3,4]].

Jeff

Edited: 9 Dec 2013, 8:36 p.m.

Well, it works either way on my Prime in Home view. But I didn't enter MAKEMAT from the catalog list; I entered it from Toolbox Math Matrix Create Make. Anyway, mine gives "makemat Error: Bad Argument Value" when I attempt to do it in CAS view.

Quote:
Hi,

I've updated to the latest firmware and am seeing behavior I don't understand.

The help documentation for MAKEMAT says that MAKEMAT(I+J-1,2,3) should create a 2x3 matrix of integers, but the I get is [[1+J-1,1+J-1,1+J-1][2+J-1,2+J-1,2+J-1]]. I've tried typing the command and executing the command from the help entry (example 3).

Any idea what's going on?

thank you,

Jeff


This is a bug in the "minus" character within the example. There were recent changes to how "negative" and "minus" were handled and displayed, and it appears it affected this example. The reason you are seeing 1+J-1 and similar entries is because the J-1 got interpreted as a symbolic name "J-1", which was handled fine in the CAS view. In the Home view, "J-1" leads to an invalid symbolic name, hence the error.

Thank you, Han.