Programming in hp prime
10-29-2019, 05:25 PM
Post: #1
 losipi Junior Member Posts: 1 Joined: Oct 2019
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.
10-29-2019, 09:44 PM (This post was last modified: 10-29-2019 09:59 PM by pinkman.)
Post: #2
 pinkman Senior Member Posts: 387 Joined: Mar 2018
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.
Set the cursor on the word plotfunc and press Help, it will help !

CU

Moi aussi je suis en France !
10-29-2019, 10:17 PM
Post: #3
 pinkman Senior Member Posts: 387 Joined: Mar 2018
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!
 « Next Oldest | Next Newest »

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