Post Reply 
Swapping Registers on HP calculators
03-27-2024, 09:43 PM
Post: #4
RE: Swapping Registers on HP calculators
n1msr Wrote:Now I am using the 15c+ [...] and need to be able to swap array elements in one of the arrays (list a[] in the Python below). When I look at the number of program steps I use, it seems inefficient. I cannot use the auto-incrementing matrix indices in this implementation - I must be able to swap two non-sucessive elements.

I suggest you forget about the Python program for the time being and just clearly explain with an example the basic manipulation you intend to perform, e.g.

"I have a 10x1 array A and another such B and I need the most efficient sequence of RPN steps to exchange element A(5,1) with element B(8,1). Also, how to exchange elements A(i,1) and A(i+1,1)"

or something like that. Also, do post your RPN code, however inefficient, to see exacctly how you're attempting to tackle the problem so that improvements can be suggested.

V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Swapping Registers on HP calculators - Valentin Albillo - 03-27-2024 09:43 PM



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