Post Reply 
IDEA: SCRIPTS ON HP-PRIME
02-01-2017, 11:46 PM
Post: #2
RE: IDEA: SCRIPTS ON HP-PRIME
The famous ti68k calcs (Unfortunately discontinued), were a product designed for the educational environment, had the option of creating scripts, you can see that at the beginning of the next code before the colon there is a character of commands, which simplify the coding

P: print the result of the statement
C: Execute the current statement
Empty: does not execute anything

PHP Code:
:DelVar ec1ec2
C
:NewProb
C
:ClrHome
 
:Local ec1ec2
 
:{0,0}soly
 
:©// "Find the dimensions of a rectangle whose area is 45 and its perimeter 28"
 
:©// "METHOD 1 (Algebraic solution, stepwise)"
 
:©// "The equations are:"
C:x*y=45ec1
C
:2x+2y=28ec2
C
:factor(ec2)
 :
©// 2*(x+y) = 28
C:ans(1)/2
C
:solve(ans(1),y)
 :
©// y=14-x
C:ec1|(ans(1))
 :
©// x*(-x+14)=45
C:expand(ans(1))
 :
©// -x^2+14*x = 45
C:solve(ans(1),x)
 :
©// x=5 or x=9
C:explist(ans(1),x)solx
 
:©//{ 5, 9 }
C:ec1|x=solx[1]
 :
©// 5*y=45
C:solve(ans(1),y)
 :
©// y=9
C:explist(ans(1),y)[1]soly[1]
 :
©// { 9 }
 
:©// test
C:ec1|x=solx[1] and y=soly[1]
 :
ec2|x=solx[1] and y=soly[1]
:
C:ec1|x=solx[2]
 :
©// 9*y=45
C:solve(ans(1),y)
 :
©// y=5
C:explist(ans(1),y)[1]soly[2]
 :
©// { 5 }
 
:©// test
C:ec1|x=solx[2] and y=soly[2]
 :
ec2|x=solx[2] and y=soly[2]
 :
©solutionsx=y=or x=y=5
 
:
C:©//"METODO2 (Solucion algebraica directa)"
C:solve(ec1 and ec2,{x,y})
 :
C:©METODO3 (Solucion grafica)
C:©//"Despejar y en ambas ecuaciones,graficar las 2 curvas y hallar los puntos de corte."
C:setmode("graph","function")
C:setgraph("axes","on")
C:0xmin:20xmax
C
:0ymin:10ymax
C
:solve(ec1,y)
C:expr("define y1(x)="&string(right(ans(1))))
C:solve(ec2,y)
C:expr("define y2(x)="&string(right(ans(1))))
C:trace
C
:delvar ec1,ec2,sol 



[Image: ti68k_scripts_image0.png]
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
IDEA: SCRIPTS ON HP-PRIME - compsystems - 01-15-2017, 01:59 AM
RE: IDEA: SCRIPTS ON HP-PRIME - compsystems - 02-01-2017 11:46 PM
RE: IDEA: SCRIPTS ON HP-PRIME - Arno K - 02-06-2017, 08:55 PM
RE: IDEA: SCRIPTS ON HP-PRIME - mark4flies - 02-08-2017, 02:34 AM
RE: IDEA: SCRIPTS ON HP-PRIME - Arno K - 02-08-2017, 09:10 PM
RE: IDEA: SCRIPTS ON HP-PRIME - Han - 02-09-2017, 09:44 PM
RE: IDEA: SCRIPTS ON HP-PRIME - eried - 02-12-2017, 10:23 PM



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