Help! Can one store a table of values as a 15c array? - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: Help! Can one store a table of values as a 15c array? (/thread-38770.html) |
Help! Can one store a table of values as a 15c array? - Glynn - 07-17-2003 A silly question, but instruction books are far away... I am currently working at a place where we do one thing repetitively all day long: quote prices on an item we manufacture. We have a base price, plus a table of prices based on the quantity and complexity of the items; the consumer pays the base price PLUS the price I find in the table. We have a billion $1 4-bangers lying around to do the job. I have the laminated table of prices on my desk. I am not supposed to supply my customers with these intermediate values. This means I talk to the customer, show him the options, then run back to my desk, calculate his price, and come back to him. This, quite frankly, embarrasses me. And it occurs to me that, in this 15c of mine, is the ability to store an arbitrary matrix such as my "table". I've never used matrices, for any reason, since getting the 15c-- but if I could enter the table into it and recall individual values from it, this would be a neat solution and yet another excuse to have my favorite calc in my pocket. Has anyone used a matrix this way, and how do you do it? If this is too silly to use the 15c for, I will probably dig out my junky wires-hanging-out '75 and try to write a BASIC program. But the 15c is so nice and unobtrusive...
;-)
Re: Help! Can one store a table of values as a 15c array? - Thibaut.be - 07-17-2003 The answer is yes BUT The matrix can't be bigger than 8x8. In addition recalling the data is not that user-friendly.
Re: Help! Can one store a table of values as a 15c array? - Valentin Albillo - 07-17-2003 Hi glynn:
It may be feasible (and convenient) depending on the
If the number of values is less than 67, there will be Please provide specific, exact and comprehensive details on the number of data and what you want to do with them (exact specifications) and it's quite possible that we can offer you some precise help or even write the routine for you.
Best regards from V.
Re: Help! Can one store a table of values as a 15c array? - Vieira, Luiz C. (Brazil) - 07-17-2003 Hi, Glynn; just to add a few more data. Based on what both Thibaut and Valentin posted, you can summarize these facts:
- the maximum number of registers in an HP15C is 67; As Valentin mentioned, you can store up to 67 numbers, but only if you have less than 64 you'll have space for a program or routine; RI, R0 and R1 cannot be converted into program steps. You can create matrices with valid dimensions starting with [64 × 1] to [1 ×64] and with any other [# of rows × # of columns], provided that # of rows × # of columns <= 64. If you find a suitable arrangement, defined by an specific # of "products" and related # of items/product, you define the matrix DIMension directly like this: # of "products" [ENTER] # of items/product [f][DIM] { [A] to [E] } The { [A] to [E] } means you can choose which one is better for you. Maybe [f][DIM] [C] suggests Costs, who knows? You can fill the matrix as a sequence of linear data, starting with C (1,1) to C (r,c), being (r,c) the indexes for the last element in the matrix. Considering r as # of rows, c as # of columns and [C] as the matrix you are going to use to store your data, follow these steps to create the matrix and store data on it:
Obs: [f][MATRIX] 0 clears all existing matrices, if any, and frees their space to new data; [f][MATRIX] 1 stores 1 in R0 and R1, "initializing" matrix index, as explained right below; USER mode is activated to allow automatic "index update" (increasingly) each time [STO] {[A] to [E]} (or [RCL] {[A] to [E]}) is pressed. Alternatively, you can use a non-sequential way to enter data that is almost the same one used to recall them non-sequentially. This method uses two stack registers contents - Y and X - as indexes for (r,c). When using sequential access, R0 and R1 are used as indexes, i.e., element C (r,c) is, in fact, C (R0, R1). If you want, you can access C (r,c) using stack registers and the element would be C (Y,X). This is accomplished with the sequences [RCL] [g]{ [A] to [E] } and [STO] [g] { [A] to [E] }. Assume you are still working with matrix C and it was defined with ten products and 5 items for each product. To create this matrix you should use: 10 [ENTER] 5 [f][DIM] [C]After you fill it with all data, let's suppose you want to add the first and the fourth elements in the third row. To recall each of them and add their values, you should do this: (1) 3 [ENTER] 1
Step (1) defines row # 3 and column # 1 as indexes; I hope this helps you a bit. If I forgot anything and you cannot do it, please, let us know. I wrote this all by heart, maybe there are errors. Success. Luiz (Brazil)
Edited: 17 July 2003, 7:22 a.m.
You guys are awesome! - Glynn - 07-17-2003 Though the H15c description here at the museum explained the modes of entry-- and I wouldn't change that description at all-- I was missing a couple of steps (or more likely, misperceiving them), resulting in "error 4"s and such when trying it solo. But I have printed out your explanation, Luiz, and just toying with it here before I go to work, I see I *can* put values into the matrix AND see them later. That is of tremendous value!! Thank you so much, Luiz! While 8x8 won't hold *ALL* permutations I have in my table, it will certainly get the lower half in, the one my mind refuses to commit to memory. This ability to put things in an array would probably be more used by business people if they knew... so many times I've seen "cheat sheets" of data in co-worker's pockets, usually "encoded", like writing the number backwards with decimal removed.
All you guys-- Dave (what a great site), Thibaut, Valentin A. and Luiz V.-- thanks for being here and being helpful and willing. I'm always amazed at the cool ideas and precise information stored in YOU.
You´re welcome! And one missing fact - Vieira, Luiz C. (Brazil) - 07-17-2003 Hello, Glynn; thank you for your kind words. One fact I did not mention is related to "randomly" store data in an existing matrix using [STO][g] {[A] to[E]}. You simply enter the value you want to store, row # and column # and press: [STO][g] {[A] to [E]}. For example, if you take the previous marix C [10,5] and want to store 12 in C (4,2) using only the stack registers, you may use the sequence: 12 [ENTER] Just to complement previous data. Best regards.
Luiz (Brazil) Edited: 17 July 2003, 1:26 p.m.
|