HP Forums
def functions on advanced graphing - 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: def functions on advanced graphing (/thread-10494.html)



def functions on advanced graphing - compsystems - 04-11-2018 09:35 PM

Hello, I want to define two functions for the application advanced graphing from history view.

purge(X,Y);
from HOME V1(X,Y):=X-2*Y=7; V2(X,Y):=5*X-3*Y=2; returns Error: Invalid input

from CAS V1(X,Y):=X-2*Y=7; V2(X,Y):=5*X-3*Y=2; returns (X,Y)->false,(X,Y)->false
solve([V1(X,Y),V2(X,Y)],[X,Y]) returns [X,Y] ?

although pressing the SYMB button the definitions of the functions are well defined

How can I define or externally delete the variables of the applications?


RE: def functions on advanced graphing - Arno K - 04-11-2018 09:47 PM

I simply tried V1:="X*Y=2" which works in Home as well as in CAS.
Arno


RE: def functions on advanced graphing - compsystems - 04-11-2018 10:07 PM

but on CAS V1:="X*Y=2" returns (X,Y)->false

same for

V1:=' X-2*Y=7' returns (X,Y)->false
V2:=' 5*X-3*Y=2'

Advanced_Graphing.V1(X,Y):= X-2*Y=7;
returns (X,Y)->false (CAS)
Error: Invalid input (Home)
Advanced_Graphing.V2(X,Y):= 5*X-3*Y=2;

CAS("V1(X,Y):=X-2*Y=7") returns program([0.,0.],[0.],false)
CAS("V2(X,Y):= 5*X-3*Y=2")

and how do I eliminate them then the variables V1, V2
purge(Advanced_Graphing.V2); // not work

HOME
purge(X,Y);
Advanced_Graphing.V1(X,Y):= 'X-2*Y=7' => Error: Invalid input
Advanced_Graphing.V1:='X-2*Y=7' // ok

purge(X,Y);
Advanced_Graphing.V2(X,Y):= '5*X-3*Y=2';
Advanced_Graphing.V2:= '5*X-3*Y=2'; // ok


RE: def functions on advanced graphing - Arno K - 04-12-2018 06:18 AM

Advanced_Graphing.V1:="X*Y=3" works from where I tried to fill that in V1, deleting is as simple as entering: Advanced_Graphing.V1:="", but you have to use strings to get that done, not quotes nor anything else.
Arno