HP Forums
Symb syntax error when pasting from command screen - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Symb syntax error when pasting from command screen (/thread-15955.html)



Symb syntax error when pasting from command screen - Todd - 11-25-2020 03:29 PM

One of the more handy things to do with a CAS graphing calculator is to copy a result from the main screen and paste it into graphing equation section and then graph it. This does not seem to work on HP Prime.

For example, let's say I differentiate a poly on the CAS command screen and the result is:

3x^2-4x+3

and I want to graph it. So, I use copy and then go to the Symb screen and try to paste it in the F1(X)= spot. It won't paste because it gets a syntax error. It turns out that the x's on the CAS command screen are NOT compatible with the Function Symbolic View screen. Is there any work-around on this bug?

Thanks!


RE: Symb syntax error when pasting from command screen - Han - 11-25-2020 06:32 PM

The lower case x in the CAS view is not the same as the upper case X used by the Function app. When typing in an expression, the Function app expects the formula to use upper case X because it uses the upper case X for its dummy variable. What you can do, however, is use the CAS view to use:

F1:=(x) -> x^2;

The -> is supposed to be the right arrow on the calculator. This stores a function (as opposed to an expression) into F1. The Function app then creates a proper expression from this function using its preferred dummy variable X (upper case).

Mathematical functions in the CAS view are created using the ( variables ) -> expression syntax. For example, a two-variable function can be created using:

f:=(x,y) -> x^2+y^2

and typing f(1,2) would produce 5 and typing f(a,b) would produce a^2+b^2 (in the CAS view).


RE: Symb syntax error when pasting from command screen - Todd - 09-28-2023 06:22 AM

Han,

I sincerely apologize for the extreme lateness of this reply to your response, especially since you responded to my question almost immediately. I very much appreciate your help and for your excellent suggestion - thank you!

(11-25-2020 06:32 PM)Han Wrote:  The lower case x in the CAS view is not the same as the upper case X used by the Function app. When typing in an expression, the Function app expects the formula to use upper