# HP Forums

Full Version: HP-41 Advanced Matrix Pac Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Angel,

Would you please explain how the New Matrix Input mode works?

Also, are the dimensioning, storing and recalling functions on the advantage module compatible with this module?

The first thing to say is that with just a couple of exceptions, every matix function from the Advantage pac is kept untouched, same functionality, same XROM id#, etc. The "Advanced Matrix Pac" builds upon the Matrix set of the advantage, leaving that one unmodified.

So you'll start by using MATDIM to create your matrix, same as always. Then it comes your choices to enter/input the matrix elements. You can used MEDIT as always, or you can use IMR (Input Matrix by Rows) or IMC (input Matrix by Columns). Either one of these three will prompt sequentially for each element, in the corresponding order until the matrix is completed.

Or you can use PMTM (Prompt Matrix), which will prompt for all row elements together as a single entry. To enter them just press ENTER^ after each element (which will write a blank space to separate the string into different numeric values), and terminate the sequence with R/S. The prompt will then ask for the next row, and so until all rows are completed.

The only input parameter is the matrix name in ALPHA. The advantage of this method is ithat it's much quicker and convenient than asking for each element individually. The limitation is that it doesn't support exponents. i.e. 1,23 E-02 - so you need to use the traditional methods if your matrix includes these.

Example: with "TEST" in ALPHA, type 3,004, MATDIM to create the matrix in X-MEM. Them execute PMTM to see:

"R1: _" -> type: 11 ENTER^ 12 ENTER 13 ENTER^ 14 R/S

"R2: _" -> type: 21 ENTER^ 22 ENTER^ 23 ENTER^ 24 R/S

"R3: _" -> type: 31 ENTER^ 32 ENTER^ 33 ENTER^ 34 R/S

Done. You can review the matrix using OMR or OMC to check.

The keyboard is redefined during data entry to accept only nummeric values plus control characters, so you're writing in Alpha and the display simultaneously even if no ALPHA indicator is on.

As you type in do you'll see the "strings" being filled with your entries, each separated by a blank space when you press ENTER^. You can use the back arrow to cancel wrong digits, and also the CHS key for negative numbers, as well as the radix key for decimal parts of course. The logic won't let you input wrong combinations of these.

If you input more elements per row than the number of matrix columns, the exceeding ones will just be ignored - so you need to remember your matrix dimension during the process. Also you can't exceed 24 characters in total, or the ALPHA register will overflow. If you do, only the rightmost 24 will be taken of course.

However inputing fewer elements that the number of columns on any of the ROW sequences will simply abort the data entry process after pressing R/S.

That's how it works, hopefully intuitive and sensible enough to be useful and practical - of course it ain't perfect and sure enough you can trick it if you really mean to.

Cheers,
"AM

Edited: 13 June 2011, 2:50 a.m.

The PMTM entry works very well, however the eigenvalue functions (CHRPOL, EIGEN, VP3X3) don't take advantage of this? I did see that flag 06 is used to determine if a matrix exists. Maybe I'm not putting the matrix in the proper registers?

Edited: 14 June 2011, 5:26 p.m.

The only program using PMTM is "MATP", the driver for the matrix product. Remember that PMTM does not allow number entry in SCI or ENG modes, thus it'll be frustrating if it was the default mode. Therefore I used IMR as default.

Yes flag 6 controls whether the matrix is already entered, so you can skip the data entry process (when F6 is set). Those programs don't use registers, but X-MEM files instead, all you need is to name the matrix (which you can enter using PMTM if you wish) as it's expected by the program, as follows:

for EV3X3: "E3"

for EIGEN: "AA"

This doesn't apply to CHRPOL or JACOBI though, can't skip the data entry for those.

Lastly, CHARPOL will return the coefficients of the characteristic polynomial but to obtain its roots you'll need to plug in the ALGEBRA module, as there's a call to the RTSN program from that ROM.

Any documention exist for the Algebra ROM?

Edit: Nevermind, I found it in the sandmath documentation.

Edited: 15 June 2011, 7:27 p.m. after one or more responses were posted

yes, the QRG is also available at TOS.

Quote:
yes, the QRG is also available at TOS.

Hi Angel,

excuse my silly question (I'm quite new here ;-)), but what or where is this TOS?

Franz

Angel,

I found a user program on TOS forum that uses routines from the MATHSTAT (or MATH I) module. It computes the characteristic equation and eigenvalues of matrices of order 2, 3, 4, and 5. The coefficients of the characteristic polynomial are computed directly, then the roots of the polynomial are solved. MATRIX is run first to enter the matrix elements, then both DET (XROM 01,06) and ROOTS (XROM 01,12) are called.

Any reason why I couldn't do the same with the IMR (or PMTM), MDET and POLYN functions from the Advanced Matrix Pac?

Edited: 16 June 2011, 7:06 p.m.

You can use any combination / variation to solve the type of problem you describe. I'd certainly not use the MATH Pac anymore, as the CCD Matrix implementation is light-year's ahead.

Just be aware that the register usage is not compatible between programs, so whatever you found at TOS will certainly need some modification if you want to exchange the MathPac programs with the Advanced Matrix functions.

CHRPOL is for me the way to go, even if it "requires" RTSN to obtain the roots. JACOBI is for symmetrical matrices (calculates the roots BTW), and of course EV3X3 is a particulat case for n=3.

TOS = "The Other Site"

euphemisn we need to resort to to avoid using the URL or any descriptive reference to the other dedicated 41 site, as it seems to be some kind of "trapping mechanism" in the museum forum preventing messages with those contents from being posted.

Quote:
TOS = "The Other Site"

euphemisn we need to resort to to avoid using the URL or any descriptive reference to the other dedicated 41 site, as it seems to be some kind of "trapping mechanism" in the museum forum preventing messages with those contents from being posted.

Oh my god, I didn't know that such animosities also exist between science/math/calculator sites (I know such nonsense only from computer chess sites and fora ;-)).

So I guess I know what you mean by TOS: a site with a big HP-41CX on the intro page, and W.F. as author!?

Well, I'm visiting it almost daily, so it seems I've not missed anything ... :-)

Franz

Lest to forget EIGEN, using SOLVE to iteratively obtain ONE eigen-value within a specific interval.

I'm not familiar with the CCD Module. What is it used for?

The CCD Array functions are the basis of the Advantage Pac Matrix Functions. Same conceptual design, same approach. Believe it or not, HP bought the rights from W&W (the company that did the CCD).