HP Forums
HP 50g - Graphing with IFTE - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: HP 50g - Graphing with IFTE (/thread-16678.html)



HP 50g - Graphing with IFTE - ramon_ea1gth - 04-17-2021 09:09 AM

The last supported ROM 2.15 has a known bug when graphing an equation that includes IFTE. IFTE is very useful to plot piecewise functions, but the HP 50g throws an 'insufficient memory' message when plotting. There are several workarounds, like using the RPL version of IFTE in a program. But working with one or several IFTE nested commands inside an equation or algebraic object is very convenient.

I bet somebody else found this workaround, but I found interesting to report it: a simple solution is to embed the equation in a program that ends with →NUM and plot that program.

For example, to graph 'IFTE(X>0,X,-X)', create this RPL program:
Code:
« 'IFTE(X>0,X,-X)' →NUM »

Save it to a variable, e.g., FX1 and enter the graphing environment with the keys [LS+][Y=]. Then add the equation to be plotted as Y1(X)=FX1 and draw it.

Another way of doing roughly the same is by putting this on the stack:
Code:
4: 'IFTE(X>0,X,-X)'
3: 'EQ1'
2: « EQ1 →NUM »
1: 'FX1'
Then press [STO][STO], go to the graphing environment, add the equation to be plotted as Y1(X)=FX1 and draw it.
This way is practical to create/edit the equation with the preferred editing tool (the equation writer or the basic editor). And to enter additional changes in the equation it is only required to edit the variable 'EQ1'.


RE: HP 50g - Graphing with IFTE - Wes Loewer - 04-17-2021 09:39 AM

You may have already read through the following thread, but the problem was discussed some years ago on comp.sys.48.

https://groups.google.com/g/comp.sys.hp48/c/R3Pp62J_9SM/m/wO1bNva6JZ8J


RE: HP 50g - Graphing with IFTE - ramon_ea1gth - 04-17-2021 11:04 AM

(04-17-2021 09:39 AM)Wes Loewer Wrote:  You may have already read through the following thread, but the problem was discussed some years ago on comp.sys.48.

https://groups.google.com/g/comp.sys.hp48/c/R3Pp62J_9SM/m/wO1bNva6JZ8J

Yes: I read it! :-) (thanks for pointing at it). Very interesting thread indeed, with workarounds and comments from Tim about reaching the limit to fix anything else in the 50g. I also found these related posts:

https://h30434.www3.hp.com/t5/Calculators/Problem-plotting-with-IFTE/m-p/6247506
https://h30434.www3.hp.com/t5/Calculators/IFTE-Bug-HP-50g-ROM-2-15/td-p/6796707
https://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv021.cgi?read=250277
https://www.hpmuseum.org/forum/thread-8129.html