Hey, I am a newbie on TI84 programming thus a newbie question probably.
Lets say I have a formula: X*COS(Z)=Y*COS(V)
Is it possible to write a code which is would be something like this.
Disp "U
Input 10
Disp "Y
Input 5
Disp "Z
Input 8
Disp "V
X
U*COSY=Y*COSV->F
ClrHome
Output(1,1,"Result
Output(2,1,round(F,2
Float
Stop
And the code solves value V. If I put in V a normal number and put an X somewhere else, it solves the X. To avoid writing the same formula 4 times using a different unknown. That would be very, very cool and would avoid making the program too bloated.
Also I am struggling on providing results on the "output" section in degrees/minutes/seconds. I've tried putting DMS function everywhere, but it ain't working out.
Assuming here we are talking about TI-BASIC, the programming language used when writing programs under the "PGRM" menu.
I do not believe that the TI-84 has the ability to solve equations in a way that you are wanting it to, so solving for and writing out the equation 4 times may be the most appropriate thing to do.
Instead of Disp and then Input, you can use the command Prompt, or you can put a string in your Input line then a comma and variable, like
Code: :Input "U=", U
You can also string together multiple things in an Output( command, like
Code: Output(2,1,round(F,2)," : ",round(M,2)," : ",round(S,2)
If F=12.34, M=56.789 and S=34.5678, the line above would display:
Code: 12.34 : 56.79 : 34.57
Which you can play around with the get the output format you desire.
Thanks for the tips!
I've found (well borrowed) a nice workaround.
Thanks Nate44, wherever you may be!
Lbl AB
Input "Scale KM=",A
Input "CD CM=",B
Input "ED KM=",C
If A=X:Then:C/BüA
A*1.852üD
ClrHome
Output(1,1,"Scale KM
Output(2,1,round(A,0
Output(3,1,"Scale NM
Output(4,1,round(D,0
End
If B=X:Then:C/AüB
B/0.393700787üF
ClrHome
Output(1,1,"CD CM
Output(2,1,round(B,2
Output(3,1,"CD IN
Output(4,1,round(F,2
End
If C=X:Then:A*BüC
C*1.852üE
ClrHome
Output(1,1,"Dist KM
Output(2,1,round(C,0
Output(3,1,"Dist NM
Output(4,1,round(E,0
End
I am glad that you have found a good workaround.
TI-BASIC can be a very powerful language, that can do a lot of what you need to do.
Keep at it, good luck, and whenever you have questions like these, don't be afraid to reach out via SAX, on a thread here, or consulting the whole back-log of knowledge on this site and others.
Here is a list of some great places to get started with BASIC programming:
https://nomkid.github.io/calcnewb
Another unrelated tip: Avoid putting "Stop" at the end of your program, as you usually don't need it, unless you are using another program to call this program, and want this program to not return to the initial program.
Thanks Noahk! I am literally a newbie and have no idea what I am doing, I am just thinking of what I would like to do and then I am using some online materials and looking through other people code and putting stuff together. But its a lot of fun, though I have no idea what is happening with the "Stop", "Float" ShinyGardevoir, it's hard sometimes to understand what is meant by something because my linguistics are lacking.
THank you!