Programming puzzles: processing lists!
|
01-27-2019, 07:18 PM
Post: #250
|
|||
|
|||
RE: Programming puzzles: processing lists!
(01-27-2019 11:49 AM)pier4r Wrote: Another point is that one has a list of sublists of the same dimension and one would like to know the average value of a particular position across the sublists. Say Though it seems counterintuitive, list processing commands on the HP 50g are usually faster than array commands. The following short program will return a list of the last elements of each sublist: Code:
Averaging (or any other operation) can then be performed on the resulting list. You can also use n GET instead of LPOPR NIP to get any nth element of each sublist. BTW, your example list makes this process hard to visualize because it is its own transpose! Try {{ 1 2 3 }{ 4 5 6 }{ 7 8 9 }} instead. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)