HP Forums

Full Version: HP50 - Another Plot of a Function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

How can I make a graphic of

[Image: plot2.jpg]

I already made a post here, and it was well answered, but it was a function of 2 equations.
This is of 3 equations.
One possible method would be to make use of a CASE statement in a program for the various ranges.

I know you prefer algebraic mode, but I'm not sure how to use CASE that way. The following RPN/RPL program was created using algebraics, so perhaps it will at least give you an idea how to set this up:
Code:
\<<
   CASE
      'X<0' THEN 'SIN(X)' END
      'X\<=2' THEN 'SQ(SIN(X))' END
      'COS(X)'
   END
\>>

The resulting plot of this program looks like this when using default settings:

[Image: attachment.php?aid=8843]
Hello!

Thank you very much!
Nice answer!

I would vote for you if you were running for president:-)



(11-04-2020 07:45 PM)DavidM Wrote: [ -> ]One possible method would be to make use of a CASE statement in a program for the various ranges.

I know you prefer algebraic mode, but I'm not sure how to use CASE that way. The following RPN/RPL program was created using algebraics, so perhaps it will at least give you an idea how to set this up:
Code:
\<<
   CASE
      'X<0' THEN 'SIN(X)' END
      'X\<=2' THEN 'SQ(SIN(X))' END
      'COS(X)'
   END
\>>

The resulting plot of this program looks like this when using default settings:

[Image: attachment.php?aid=8843]
Reference URL's