The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

makemat on HP Prime
Message #1 Posted by Jeff Nye on 9 Dec 2013, 7:04 p.m.

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
Message #2 Posted by Michael de Estrada on 9 Dec 2013, 7:58 p.m.,
in response to message #1 by Jeff Nye

You need to run it in the Home screen.

            
Re: makemat on HP Prime
Message #3 Posted by Jeff Nye on 9 Dec 2013, 8:07 p.m.,
in response to message #2 by Michael de Estrada

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

                  
Re: makemat on HP Prime
Message #4 Posted by Michael de Estrada on 9 Dec 2013, 8:09 p.m.,
in response to message #3 by Jeff Nye

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
Message #5 Posted by Jeff Nye on 9 Dec 2013, 8:34 p.m.,
in response to message #4 by Michael de Estrada

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
Message #6 Posted by Michael de Estrada on 9 Dec 2013, 8:45 p.m.,
in response to message #5 by Jeff Nye

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
Message #7 Posted by Edwin on 9 Dec 2013, 8:02 p.m.,
in response to message #1 by Jeff Nye

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

            
Re: makemat on HP Prime
Message #8 Posted by Jeff Nye on 9 Dec 2013, 8:08 p.m.,
in response to message #7 by Edwin

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
Message #9 Posted by Han on 9 Dec 2013, 9:35 p.m.,
in response to message #1 by Jeff Nye

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
Message #10 Posted by Jeff Nye on 10 Dec 2013, 1:25 p.m.,
in response to message #9 by Han

Thank you, Han.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall