Texas Instruments ( TI-84 Plus)(calculator) scripting
Posted: Wed Jun 24, 2009 1:38 am
Hello everyone,
I want to teach you guys a simple script with the calculator.
What does it do?
If you press the button "window" you will see a list with some variables, maybe you know if you change the window bounds to example 2000, the Xmin, Xmax, Ymin and Ymax.
the scanlines in the graph will be so close together that they will form a line. that is what you do not want.
the standard graph has exactly 20 lines, that is what we want.
there are a few things you should know.
to get some stuff in your script you need to press these
now this does not looks clean, so here is the script again. but without comments..
To show that it really works...
I will first set the window to standard at first, just so you can do the same.(if you have this calculator). Then i set Xmin= -12,8983E-19 , Xmax= 12,92843E-19 , Ymin= -0,9767 , Ymax= 0,8237
ill calculate them too on my own
the Xscl will be (12,92843E-19+12,8983E-19)/20=1.2913365E-19
the Yscl will be (0,8237+0,9767)/20=0.09002
now i am going to run my script.
The output:
and now there are 20 scanlines on the X Axle and 20 on the Y Axle.
I want to teach you guys a simple script with the calculator.
What does it do?
If you press the button "window" you will see a list with some variables, maybe you know if you change the window bounds to example 2000, the Xmin, Xmax, Ymin and Ymax.
the scanlines in the graph will be so close together that they will form a line. that is what you do not want.
the standard graph has exactly 20 lines, that is what we want.
there are a few things you should know.
to get some stuff in your script you need to press these
- -to get Xscl, Yscl, Ymin, Ymax, Xmin, Xmax --> When you are at your script, Press Vars-->Window
-to get the "->" to store a variable simply press the button called "sto>"
-to get Pause , when you are at your script, press PRGM-->CTL-->Press 8
-to get Stop, when you are at your script, press PRGM-->CTL-->Press F
-to get Disp, when you are at your script, press PRGM-->I/O-->Press 3
-to get DelVar, when you are at the script, press PRGM-->CTL-->Press G
- Code: Select all
//we want to store the space between the lines before we change them, so we can show them after, I stored the Xscl in the Q and the Yscl in the R.
Xscl->Q
Yscl->R
//these 2 lines change the Xscl and the Yscl, the Xscl is the space between a scanline on the X axle. and you can probably guess that the Yscl is the space between a scanline on the Y axle, and because we want 20 lines, we will devide the difference between the Ymax and Ymin, and we will devive the difference between the Xmax and Xmin.
//Now we will change the values of Yscl and Xscl, by using the ->.
(Ymax-Ymin)/20->Yscl
(Xmax-Xmin)/20->Xscl
//Now we will store the new values of the Yscl and Xscl, I chose V for Xscl and W for Yscl.
Xscl->V
Yscl->W
//Now We will display the values before the change, We are going to use the function "Disp" to display the text and the values. to start a new line place a ","
//we stored the value of the Xscl before in Q, and Yscl in R.
Disp "BEFORE:", "Xscl:", Q, "Yscl:", R
//We don't want to display the values after directly, so we use a "Pause", you can add a message with the pause.
Pause "PRESS ENTER"
//now we display the values after.
Disp "AFTER:", "Xscl:", V, "Yscl:", W
//To erase the values from the variables we used(this means they will be erased from the memory, and their value will be 0), we use the "DelVar" function
DelVar Q
DelVar R
DelVar V
DelVar W
//to remove the program from the memory we place a stop
Stop
now this does not looks clean, so here is the script again. but without comments..
- Code: Select all
Xscl->Q
Yscl->R
(Ymax-Ymin)/20->Yscl
(Xmax-Xmin)/20->Xscl
Xscl->V
Yscl->W
Disp "Before:", "Xscl:", Q, "Yscl:", R
Pause "PRESS ENTER"
Disp "After:", "Xscl:", V, "Yscl:", W
DelVar Q
DelVar R
DelVar V
DelVar W
Stop
To show that it really works...
I will first set the window to standard at first, just so you can do the same.(if you have this calculator). Then i set Xmin= -12,8983E-19 , Xmax= 12,92843E-19 , Ymin= -0,9767 , Ymax= 0,8237
ill calculate them too on my own
the Xscl will be (12,92843E-19+12,8983E-19)/20=1.2913365E-19
the Yscl will be (0,8237+0,9767)/20=0.09002
now i am going to run my script.
The output:
- Code: Select all
BEFORE:
Xscl:
1
Yscl:
1
PRESS ENTER
AFTER:
Xscl:
1.2913365E-19
Yscl:
.09002
Done
and now there are 20 scanlines on the X Axle and 20 on the Y Axle.