Post Reply 
(50g) Numeric List Commands
05-18-2019, 09:26 PM
Post: #3
RE: (50g) Numeric List Commands
Updating this thread to add a program for deconvolution. Given a list on level 2 that is the (suspected) result of the convolution of two lists, and a "test" list on level 1, the program will return the list which must be convolved with the level 1 list to produce the level 2 list.

Note that unlike convolution, deconvolution is sensitive to the order of the lists. If the stack order of the lists is reversed, the program will return nonsense results. Also, the lengths of the two lists must be the same.

As an example, in level 2, { 1 6 20 50 105 196 336 } which are the 4-dimensional pyramidal numbers and on level 1,
{ 1 3 5 7 9 11 13 } - the odd numbers. The program returns { 1 3 6 10 15 21 28 } - the triangular numbers.

Code:

\<< OVER HEAD OVER HEAD / 1. \->LIST UNROT 2. OVER SIZE
  FOR k PICK3 OVER 2. k SUB REVLIST * 0 + \GSLIST PICK3 k GET PICK3 HEAD * SWAP - 4. ROLL SWAP + UNROT
  NEXT DROP2
\>>

For HP-48G compatibility, replace UNROT with ROT ROT and replace PICK3 with 3 PICK.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(50g) Numeric List Commands - John Keith - 01-16-2019, 11:24 PM
RE: (50g) Numeric List Commands - John Keith - 05-18-2019 09:26 PM



User(s) browsing this thread: 1 Guest(s)