HP Forums

Full Version: IDENMAT() Error: Invalid input
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
IDENMAT() gives the "Error: Invalid input" error message when the value is 33 or above, for example IDENMAT(33) will give this error, but IDENMAT(32) won't. This is probably a bug and not caused memory constraint because I can generate a 100x100 matrix just fine.
This happens on HP Prime Virtual Calculator and Version A, Build 2.1.14425 (2020 1 16).

I was trying to test a whether a given matrix is an identity matrix M1==IDENMAT(rowDim(M1)). I would appreciate if someone can tell me another way that is as easy.
you are using it in a program so you could show the code or just enter it in the application
Sorry my bad English

I attach a program code that performs the same function create an identity matrix given the number of columns you just need enter MATRI_IDEN () instead of IDENMAT ()
You can also use identity(34) instead of the program suggested by Armando.

-road
The [Toolbox] catalog shows this as IDENMAT(n), using upper case, and suggesting that this is a HOME command. However, if you use this command in CAS, it works as the original post intended.

So to get it to work in HOME, (or PPL), you can merely fake it as a CAS command:

[HOME]
CAS.IDENMAT("33"); ==> {33,33} identity matrix.

-Dale-
Reference URL's