HP Forums
trying to display unusual matrix reboots calculator - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: trying to display unusual matrix reboots calculator (/thread-8590.html)



trying to display unusual matrix reboots calculator - webmasterpdx - 06-28-2017 10:58 AM

I set a matrix, m to [[1 2 3],[4 5 6],[7 8 9]]
Then I was trying to see how the at() undocumented function works. So far, I'd only used it on vectors, so I wanted to try setting position in matrix to 4, thinking it might be the first element on second row, but instead it created a 4th row equal to one element (no longer a matrix).
i.e. m[4]=<99;
So this just added a 4th column/row and set it to 99, so it's no longer a square matrix.
When I put it in matrix mode and clicked on it, it rebooted the calculator.
Why did it do that?


RE: trying to display unusual matrix reboots calculator - DrD - 06-28-2017 11:10 AM

Try using inter-digit comma's instead of spaces...


RE: trying to display unusual matrix reboots calculator - webmasterpdx - 06-28-2017 01:29 PM

I did....CAS turns them into spaces.


RE: trying to display unusual matrix reboots calculator - Didier Lachieze - 06-28-2017 01:44 PM

According to xcas documentation, at() applies to a list. Here you want to address elements of a matrix, you can address the first element on second row by m(2,1): m(2,1)=<99


RE: trying to display unusual matrix reboots calculator - webmasterpdx - 06-28-2017 05:16 PM

I know that, I'm just curious why displaying an array with 3 rows 3 wide and a 4th row only one wide causes the calculator to reboot?


RE: trying to display unusual matrix reboots calculator - webmasterpdx - 06-28-2017 05:22 PM

Actually, i said that wrong. It's when I enter shift-matrix and select this malformed matrix, it causes the system to reboot.


RE: trying to display unusual matrix reboots calculator - Tim Wessman - 06-28-2017 05:44 PM

Can you post the exact input and steps you were trying? I've been unable to see this reboot or get any malformed matrix stuff created.

Thanks!


RE: trying to display unusual matrix reboots calculator - DrD - 06-28-2017 06:29 PM

Your OP contains the corrupted matrix:
[[1 2 3],[4 5 6],[7 8 9]]

If, instead, you use:
[[1,2,3],[4,5,6],[7,8,9]]

You will see that your example has a syntax error, (mine works fine on my devices). Copy these and paste them into your command line to easily verify this for yourself ...

You can also use: m:=[[1,2,3],[4,5,6],[7,8,9]];


RE: trying to display unusual matrix reboots calculator - webmasterpdx - 06-28-2017 09:17 PM

(06-28-2017 05:44 PM)Tim Wessman Wrote:  Can you post the exact input and steps you were trying? I've been unable to see this reboot or get any malformed matrix stuff created.

Thanks!

What I did was create a 3x3 matrix as in:
m:=[[1 2 3][4 5 6][7 8 9]];
....just use the matrix editor and you can make it.

Then when you type m, you should get:
m = 1 2 3
4 5 6
7 8 9

Next, execute the following command...make sure you are in CAS mode first...

m[4]=<99; // This is actually array_sto(99,at(m,3));

This will create m = [[1 2 3][4 5 6][7 8 9]99]
...which is a malformed matrix

You can go to shift-matrix
scroll to m[CAS] and click on it.
It will cause the reboot.

I'm not too worried about it at this point. Clearly I did an illegal operation. I was assigning a scalar to a matrix row for which space was not yet created.....so it's an illegal access, which is causing a reboot.