HP Forums
makemat on HP Prime - 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: makemat on HP Prime (/thread-258188.html)



makemat on HP Prime - Jeff Nye - 12-09-2013

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




Re: makemat on HP Prime - Michael de Estrada - 12-09-2013

You need to run it in the Home screen.


Re: makemat on HP Prime - Edwin - 12-09-2013

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


Re: makemat on HP Prime - Jeff Nye - 12-09-2013

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


Re: makemat on HP Prime - Jeff Nye - 12-09-2013

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.


Re: makemat on HP Prime - Michael de Estrada - 12-09-2013

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.


Re: makemat on HP Prime - Jeff Nye - 12-09-2013

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.


Re: makemat on HP Prime - Michael de Estrada - 12-09-2013

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.


Re: makemat on HP Prime - Han - 12-09-2013

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.


Re: makemat on HP Prime - Jeff Nye - 12-10-2013

Thank you, Han.