OBJECT: ARRAY v2.1 Matrix Utilities (S/SX/G/GX) AUTHOR: Daniel Lopez Sancho (February 1996) DISCLAIMERS The library is provided 'as it' and is subject to change without notice. No warranty of any kind is made with regard to the software or documentation. The author shall not be liable for any incidental error or consequential damages in connection with the software and/or the documentation. Permission to freely distribute this software is granted provided this manual is distributed with it without any modification. ARRAY v2.1 can't be used for any commercial purpose without written permission from the author. This implies the user should not be charged for the use of ARRAY v2.1 in any way. Please excuse all the linguistic errors in this text. English is not my native language (Spanish). INTRODUCTION This library is useful for column and row manipulation. All of the commands accept matrix and vectors of any numerical type (real and complex) and they are quite fast (Sys-RPL). INSTALLING THE LIBRARY 1. Upload to your 48 the file ARRAYv21.lib with Kermit, Usend, XYModem or any other transfer protocol. Remember to use binary transfer. 2. Recall the contents of ARRAYv21.lib to the stack ( 'ARRAYv21.LIB' [RCL] ). 3. Purge ARRAYv21.lib to save memory. 4. Press 0 (or any other port number you can access) and [STO]. 5. Turn off and on your machine (or restart it by pressing [ON]+[C]). Now your LIBRARY menu will contain the next label: [ARRAY] COMANDS: M->R: (matrix to row) 2: [[1 2][3 4]] 2: [[1 2][3 4]] 1: 1 1: [1 2] M->C: (matrix to column) 2: [[1 2][3 4]] 2: [[1 2][3 4]] 1: 1 1: [1 3] R->M: (row to matrix) 3: [[1 2][3 4]] 1: [[5 6] 2: [5 6] [3 4]] 1: 1 C->M: (column to matrix) 3: [[1 2][3 4]] 1: [[5 2] 2: [5 6] [6 4]] 1: 1 DR: (delete row) 2: [[1 2][3 4]] 1: [[3 4]] 1: 1 DC: (delete column) 2: [[1 2][3 4]] 1: [[2] 1: 1 [4]] MD->R: (matrix&delete to row) 2: [[1 2][3 4]] 2: [[3 4]] 1: 1 1: [1 2] MD->C: (matrix&delete to column) 2: [[1 2][3 4]] 2: [[1][3]] 1: 2 1: [2 4] IR->M: (insert row in matrix) 3: [[1 2][3 4]] 1: [[5 6] 2: [5 6] [1 2] 1: 1 [3 4]] IC->M: (insert column in matrix) 3: [[1 2][3 4]] 1: [[5 1 2] 2: [5 6] [6 3 4]] 1: 1 MEV: (matrix evaluation) Takes a matrix and a program and returns the matrix resultant of applying the program to each component of the matrix. 2: [[1 2][3 4]] 1: [[2 3] 1: << 1 + >> [4 5]] MCMP: (matrix computation) Allows operations with columns and row in every way RPL does. It takes a matrix and a program and returns a matrix resulting of the evaluation of the program. The result of the program evaluation is inserted in the matrix. The program has three restrictions: - The program must have only one argument and must return only one result. - The columns and rows will be indicated as CN and RN where C, R stand for column, row and N is the number - You can't mix columns and rows in the same program 2: [[1 2][3 4]] 1: [[1 2 3] 1: << C1 C2 + >> [3 4 7]] 2: [[1 2][3 4]] 1: [[1 2] 1: << R1 3 * R2 + >> [3 4] [6 10]] 2: [[1 2][3 4]] 1: [[1 2 1.792] 1: << C1 C2 + C2 * LN >> [3 4 3.332]] IMMR: (insert matrix in matrix by rows) Takes two matrix and returns a matrix resulting of the fusion (made by rows) of the two matrix. 2: [[1 2][3 4]] 1: [[1 2] 1: [[1 2][3 4]] [3 4] [1 2] [3 4]] If the dimensions of the second matrix are bigger than the first one, the second one will be cut to fit the first one. IMMC: (insert matrix in matrix by columns) Does the same than IMMR but does the fusion by columns 2: [[1 2][3 4]] 1: [[1 2 1 2] 1: [[1 2][3 4]] [3 4 3 4]] INFOSARRAY: shows info about the library FINAL REMARKS: - Full compatibility between real and complex 1. R->M: 3: [[1 2][3 4]] 1: [[(5,5)(6,6)] 2: [(5,5)(6,6)] [(3,0)(4,0)]] 1: 1 2. C->M: 3: [[(1,1)(2,2)][(3,3)(4,4)]] 1: [[(5,0)(2,2)] 2: [5 6] [(6,0)(4,4)]] 1: 1 3. IMMR: : 2: [[1 2][3 4]] 1: [[(1,0)(2,0)(1,1)(2,2)] 1: [[(1,1)(2,2)][(3,3)(4,4)]] [(3,0)(4,0)(3,3)(4,4)]] 4. MEV: 2: [[1 2][3 4]] 1: [[(2,1)(3,1)] 1: << (1,1) + >> [(4,1)(5,1)]] - Some of the commands of the library are included in the G/GX series: * MD->R is the same than G's ROW- * IR->M is the same than G's ROW+ * MD->C is the same than G's COL- * IC->M is the same than G's COL+ It's NOT a good idea to extract this commands if you have got a G/GX because there are other commands in the library that use these ones as subroutine. Mines are almost as fast as the ones included in the G/GX series. - The library has been developed on a HP48SX with the RPL48 v1.12b DEVELOPMENT PACKAGE, the DEBUGGER 1.0b and ED. It is completely written in Sys-RPL and. It makes use of many "unsupported" entries. Use it at your own risk. It has been working for months on a HP48SX revision J and on a HP48G revision R and nothing wrong has happened. However, remember to backup your memory before using it. - Library is ID 336. Its size is 2641 bytes and its checksum is #705Fh. ACKNOWLEDGEMENTS I would like to thank the following persons: - Detlef Mueller and Raymond Hellstern for RPL48 - Mika Heiskanen for DEBUGGER and ED - DJ MURDOCK for many talks about solving routines - HP for HP48 and TOOLS As I explained in the DISCLAIMERS part, this software is freeware, but many hours (and days...) of programming and debugging have been invested in developing this library. So, the author will be much more than satisfied if someone tells him that he appreciates the library and he uses it a lot. Author will also be glad to solve (or at least, try to...) all the problems that you can find using ARRAYv2.1 For this reason, you can contact me by: POST: Daniel Lopez Sancho c/ Gran Via Carlos III, 67 4º2ª 08028 BARCELONA SPAIN PHONE: SPAIN - 93 - 330 78 42 FAX: SPAIN - 93 - 377 15 14 E-mail: corma@sefes.es I will try to answer all doubts I receive.