Post Reply 
Programming in hp prime
10-29-2019, 05:25 PM
Post: #1
Programming in hp prime
Hi
I am actually studying maths in France and i want to create a programm that draw a fonction with a parameter.
In the programm, i get a syntax error when i put "plotfunc", so i dont know how to draw the graph.
I can t find the answer in the user guide, so i would like to know how to draw a graph from a programm.
Thanks for your help
Find all posts by this user
Quote this message in a reply
10-29-2019, 09:44 PM (This post was last modified: 10-29-2019 09:59 PM by pinkman.)
Post: #2
RE: Programming in hp prime
(10-29-2019 05:25 PM)losipi Wrote:  Hi
I am actually studying maths in France and i want to create a programm that draw a fonction with a parameter.
In the programm, i get a syntax error when i put "plotfunc", so i dont know how to draw the graph.

plotfunc is a CAS function, try to create a CAS program and execute it in the CAS view.

Code:

#cas
MYGRAPH():=
BEGIN
 plotfunc(SIN(x));
END;
#end

Quote:I can t find the answer in the user guide, so i would like to know how to draw a graph from a programm.
Thanks for your help
Set the cursor on the word plotfunc and press Help, it will help !

CU

Moi aussi je suis en France ! Smile
Find all posts by this user
Quote this message in a reply
10-29-2019, 10:17 PM
Post: #3
RE: Programming in hp prime
You should also consider creating your own drawing function (in a standard, not CAS program) using Xmin, Xmax, RECT(), PIXON(), WAIT() ...

Code:

EXPORT MYGRAPH2()
BEGIN
 Xmin:=-8; Xmax:=8;
 Ymin:=-2; Ymax:=2;
 RECT(); // clear screen
 FOR X FROM -8 TO 8 STEP .1 DO
  PIXON(X, SIN(X));
 END;
 WAIT;
END;

Or your program could define one of F1 .. F9 functions, switch to Function app with STARTAPP() and plot view with STARTVIEW() then let the user and the system plot the func and manipulate it.

Programming the Prime is funny and full of options!
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)