HP Forums

Full Version: PIECEWISE editing improvement suggestion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
One can define a piecewise function with the command PIECEWISE(cond1,expr1,cond2,expr2...)
(BTW, is there a limit to the number of cond and expr?). Once entered, this transforms into the usual math notation
{exp if cond ...

If a piecewise function is entered in the function app, and later that definition needs to be updated, say by adding a new condition, the editor does not allow that. It would be nice to be able to do so as one does with matrices.

Also, the math template key provides a menu where one finds the template for piecewise at the (2,5) entry, but it offers only two conditions. Could that be made to work like the matrix template that allows for adding rows (and columns)?
Put the cursor after the if in your last definition and press [ , ] . There you go.

I'll investigate ways to make this more obvious.
sorry for my bad English

TIM >> I'll investigate ways to make this more obvious
can be to place in the title bar a temp message, or create a temporary status bar
"use [,] to include a new condition"

Request: Please improve it in the next kernel upgrade, the following

No pretty print for (x < -pi) is displayed as (-pi > x) UGLY
same for x<0

Example
F1(x):=PIECEWISE( X<0, PIECEWISE( X< -pi , 4*sin(X), 2*X+5 ), 5-X^2 ) [ENTER] =>

F1(x):=PIECEWISE( 0>x, PIECEWISE( -pi > x , 4*sin(x), 2*x+5 ), 5-x^2 )
(12-13-2013 03:22 PM)Tim Wessman Wrote: [ -> ]Put the cursor after the if in your last definition and press [ , ] . There you go.

I'll investigate ways to make this more obvious.

Once you know how, it makes perfect sense. Thanks!
Hello,

(12-13-2013 08:46 AM)Alberto Candel Wrote: [ -> ]One can define a piecewise function with the command PIECEWISE(cond1,expr1,cond2,expr2...)
(BTW, is there a limit to the number of cond and expr?).

yes, the limit is either 7 or 8 groups. if my memory serves me well.

Cyrille
Reference URL's