Help! Can one store a table of values as a 15c array?



#5

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...

;-)


#6

The answer is yes

BUT

The matrix can't be bigger than 8x8.

In addition recalling the data is not that user-friendly.


But if this is sufficient for you, it's worth trying !

#7

Hi glynn:

It may be feasible (and convenient) depending on the
amount of data we're talking about. If the number of table values is 67 or less, you can indeed store them in an HP-15C array and recall them manually at will.

If the number of values is less than 67, there will be
some space still left to write a small program that would do the recalling and even perform some calculations using the stored values, automatically.

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.

#8

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;

- only 64 of them can be used in matrices, because RI, R0 and R1 will be always RI, R0 and R1;

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:

(1) [f][MATRIX] 0 (or [ON]/[-] to clear all memory)
(2) r [ENTER] c [f][DIM] [C]
(3) [f][MATRIX] 1
(4) [f][USER] (to activate USER mode)
(5) enter first data
(6) [STO] [C] (shows element indexes while [C] key is held down)
(7) enter next data
(8) back to step (6) till last data

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
(2) [RCL][g] [C] ([C 3,1 ] is briefly shown)
(3) 3 [ENTER] 4
(4) [RCL][g] [C] ([C 3,4 ] is briefly shown)
(5) [+]

Step (1) defines row # 3 and column # 1 as indexes;

step (2) recalls C (3,1) (or C (Y,X)) to the stack;

step (3) defines row # 3 and column # 4 as indexes; note that previously recalled value is now in Z-register;

step (4) recalls C (3,4) to the stack; now you have C (3,1) and C (3,4) in Y and X registers, respectively;

step (5) adds them both.

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.


#9

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.


#10

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]
4 [ENTER]
2 [STO][g] [C] ( [C 4,2 ] shown briefly)

Just to complement previous data.

Best regards.

Luiz (Brazil)

Edited: 17 July 2003, 1:26 p.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime touch periodic table : new version Mic 4 474 11-25-2013, 05:29 PM
Last Post: Terje Vallestad
  Touch periodic table on HP Prime - revisited Terje Vallestad 2 366 11-23-2013, 11:47 AM
Last Post: Mic
  [HP Prime] Constants Library Values Timothy Roche 24 1,814 11-02-2013, 04:17 PM
Last Post: Les Koller
  Touch periodic table on HP Prime Mic 30 2,215 10-27-2013, 04:45 AM
Last Post: Les Koller
  HP Prime: How to use a large array in a program? HP Pioneer 2 293 10-27-2013, 03:15 AM
Last Post: steindid
  Periodic table for HP Prime Mic 15 1,042 10-19-2013, 12:20 PM
Last Post: Joseph Ec
  [HP -Prime CAS] List, Matrix, Vector as one Array? CompSystems 0 214 07-26-2013, 05:22 PM
Last Post: CompSystems
  HP41 Functions Address Table (F.A.T.) Antoine M. Couëtte 6 539 07-21-2013, 02:48 AM
Last Post: Antoine M. Couëtte
  HP 35s - multiple program input values? Arno 3 428 04-29-2013, 11:27 AM
Last Post: Gerson W. Barbosa
  HP-50g How to store many equations - help needed Timo Labrenz 5 550 03-03-2013, 12:22 PM
Last Post: Timo Labrenz

Forum Jump: