(15C) Triangle, Square, and Sawtooth Waves - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (15C) Triangle, Square, and Sawtooth Waves (/thread-20950.html) |
(15C) Triangle, Square, and Sawtooth Waves - Eddie W. Shore - 12-04-2023 08:24 PM Registers Used: R1 = amplitude (A) R2 = period (P) Load A and P in R1 and R2 and then load x in the x stack. X must be non-negative or an error occurs (Error 0). Step | Key Code | Key Triangle Wave Code: 001 | 42, 21, 11 | LBL A Square Wave Code: 018 | 42, 21, 12 | LBL B Code: 032 | 42, 21, 13 | LBL C Examples Let P = 2, A = 1 X = 1 Triangle: 0.0000 Square: -1.0000 Sawtooth: 0.5000 X = 2.5 Triangle: 1.0000 Square: 1.0000 Sawtooth: 0.2500 X = 4.8 Triangle: 0.4000 Square: 1.0000 Sawtooth: 0.4000 |