What is Causing Errors in My TI-89 Physics Program?

  • Context: Calculators 
  • Thread starter Thread starter Clutch Cargo
  • Start date Start date
  • Tags Tags
    Programming Ti-89
Click For Summary

Discussion Overview

The discussion revolves around issues encountered while programming on the TI-89 calculator, specifically focusing on a program intended to calculate relativistic velocity and another for plotting vertical curves in surveying. Participants share their experiences, syntax corrections, and troubleshooting tips related to programming errors.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant shares a program for calculating relativistic velocity but encounters errors related to input functions and conditional statements.
  • Another participant suggests that the syntax for input functions differs between the TI-83+ and TI-89, recommending the use of commas instead of dots and renaming variables.
  • A different participant notes that programming for the TI-89 is fundamentally different from the TI-83+, highlighting the need for specific resources for the TI-89.
  • One participant proposes an alternative method for inputting numerical data using the 'Request' function and converting strings to numerical data, citing a successful example from the manual.
  • Several participants discuss a separate program for plotting vertical curves, with one expressing confusion over a "missing parenthesis" error and sharing their code for review.
  • Another participant points out potential syntax issues in the vertical curve program, particularly regarding the use of commas and the structure of the code.
  • Some participants express ongoing issues with the vertical curve program despite suggested corrections, indicating a lack of resolution.

Areas of Agreement / Disagreement

Participants generally agree on the need for correct syntax in programming on the TI-89, but there are multiple competing views on the specific corrections needed, and the discussion remains unresolved regarding the vertical curve program errors.

Contextual Notes

Limitations include unresolved syntax issues, dependence on specific calculator models, and the potential for errors in variable naming conventions. The discussion reflects a variety of programming approaches and experiences without a clear consensus on solutions.

Clutch Cargo
Messages
18
Reaction score
0
After looking for programs for advanced physics with no luck I decided to write my own.
What I have so far is a simple program to calculate relitavistic velocity:

(v1,v2)
Prgm:Local
Input "Enter velocity 1" .v1
Input "Enter velocity 2" .v2
If v1<0 Then
(v1+v2)/(1+(v1*v2))»vr
EndIf
If V1>.9999 Then
(v1+v2)/(1+(v1*v2)/_c^2)»vr
EndIf
Disp "Relativistic Velocity",vr
Pause
DelVar vr
EndPrgm

The problem I have is that no matter what I do I get errors.

First it doesn't like my Input functions, if I take those out it doesn't like my If statements, if I take those out as well it doesn't even like the math statements. Can anyone tell me what I'm doing wrong? P.S. the math functions nested in the If statements are indented but this BB doesn't show that.
 
Computer science news on Phys.org
Code:
Input "Enter velocity 1" .v1
Input "Enter velocity 2" .v2
Firstly, on my old 83+, this would be written as
Code:
Input "Enter velocity 1", U
Input "Enter velocity 2", V
Note that I replaced the dot by a comma, and that I renamed the variables as I'm not sure it can handle names with numbers in them.
Also, what's with the (v1, v2) on the top line? I hope that's not in your actual program? Or is it something TI-89-ful?
 
I used to be pretty handy with the TI-83+, and I can tell you for certain that programming for the TI-86 or TI-89 is totally different, the command syntax is different, the variable names are different, the memory allocation is different. Everything is different.

Don't let that discourage you, just saying you're going to need to find a specific TI-89 resource.
 
Clutch Cargo said:
After looking for programs for advanced physics with no luck I decided to write my own.
What I have so far is a simple program to calculate relitavistic velocity:

Input "Enter velocity 1" .v1
Input "Enter velocity 2" .v2

The problem I have is that no matter what I do I get errors.

First it doesn't like my Input functions

In the sample program given in the manual, input of numerical data is done in a strange way. A string is inputted, which is then converted to numerical data. I recently used a TI-89 program that used this technique and an If statement, and the program worked fine.

Try

Request "Enter velocity 1",v1
Request "Enter velocity 2",v2
expr(v1)->v1
expr(v2)->v2
 
yes your problem is in your syntax;
Input "Enter velocity 1" .v1
Input "Enter velocity 2" .v2
it should be;
Input "Enter velocity 1",v1
Input "Enter velocity 2",v2
 
please help ti-89 programming

keep getting missing paenthisis error can someone help this is a program for plotting vertical curves for surveying

Prgm
ClrIO
Local b,f,l,e,s,vpc,vpt,svpc,svpt,c,i
Dialog
Title "Variables"
Request "Backslope",b
Request "Foreslope",f
Request "Length In Stations",l
Request "Elevation at VPI",e
Request "Station at VPI In feet",s
EndDlog
Define c=(f-b)/(2*l)
Define vpc=e+(b*(l/2))
Define svpc=s-((l/2)*100)
Define vpt=e+(f*(l/2))
Define svpt=s+((l/2)*100)
Dialog
Title "Stationing and Elevation"
Text "VPC Elevation="(vpc)
Text "VPC Station="(svpc)
Text "VPT Elevation="(vpt)
Text "VPT Station="(svpt)
Text "Coefficient of Curvature="(c)
EndDlog
Pause
Dialog
Request "Starting Point",sp
Request "Interval of Points on Curve",i
Request "Height 1",h
Request "Height 2",o
EndDlog
Define d=§((2/l)(§(h)+§(o))^2)/(b-f)
Define x=(b*l)/(b-f)
define z=vpc+b(sp+i)+c(sp+i)^2
define w=vpc+b(sp+i2)+c(sp+i2)^2
define v=vpc+b(sp+i3)+c(sp+i3)^2
define u=vpc+b(sp+i4)+c(sp+i4)^2
define t=vpc+b(sp+i5)+c(sp+i5)^2
define p=vpc+b(sp+i6)+c(sp+i6)^2
define r=vpc+b(sp+i7)+c(sp+i7)^2
define q=vpc+b(sp+i8)+c(sp+i8)^2
define m=vpc+b(sp+i9)+c(sp+i9)^2
define n=vpc+b(sp+i10)+c(sp+i10)^2
define max=(vpc+b(ix)+c(ix)^2)
Dialog
Text "Elevation at X="(sp+i),(z)
Text "Elevation at X="(sp+i2),(w)
Text "Elevation at X="(sp+i3),(v)
Text "Elevation at X="(sp+i4),(u)
Text "Elevation at X="(sp+i5),(t)
Text "Elevation at X="(sp+i6),(p)
Text "Elevation at X="(sp+i7),(r)
Text "Elevation at X="(sp+i8),(q)
Text "Elevation at X="(sp+i9),(m)
Text "Elevation at X="(sp+i10),(n)
Text "Elevation at X="(x),(max)
EndDlog
EndPrgm
 
ablemerle1 said:
keep getting missing paenthisis error can someone help this is a program for plotting vertical curves for surveying

Prgm
ClrIO
Local b,f,l,e,s,vpc,vpt,svpc,svpt,c,i
Dialog
Title "Variables"
Request "Backslope",b
Request "Foreslope",f
Request "Length In Stations",l
Request "Elevation at VPI",e
Request "Station at VPI In feet",s
EndDlog
Define c=(f-b)/(2*l)
Define vpc=e+(b*(l/2))
Define svpc=s-((l/2)*100)
Define vpt=e+(f*(l/2))
Define svpt=s+((l/2)*100)
Dialog
Title "Stationing and Elevation"
Text "VPC Elevation="(vpc)
Text "VPC Station="(svpc)
Text "VPT Elevation="(vpt)
Text "VPT Station="(svpt)
Text "Coefficient of Curvature="(c)
EndDlog
Pause
Dialog
Request "Starting Point",sp
Request "Interval of Points on Curve",i
Request "Height 1",h
Request "Height 2",o
EndDlog
Define d=§((2/l)(§(h)+§(o))^2)/(b-f)
Define x=(b*l)/(b-f)
define z=vpc+b(sp+i)+c(sp+i)^2
define w=vpc+b(sp+i2)+c(sp+i2)^2
define v=vpc+b(sp+i3)+c(sp+i3)^2
define u=vpc+b(sp+i4)+c(sp+i4)^2
define t=vpc+b(sp+i5)+c(sp+i5)^2
define p=vpc+b(sp+i6)+c(sp+i6)^2
define r=vpc+b(sp+i7)+c(sp+i7)^2
define q=vpc+b(sp+i8)+c(sp+i8)^2
define m=vpc+b(sp+i9)+c(sp+i9)^2
define n=vpc+b(sp+i10)+c(sp+i10)^2
define max=(vpc+b(ix)+c(ix)^2)
Dialog
Text "Elevation at X="(sp+i),(z)
Text "Elevation at X="(sp+i2),(w)
Text "Elevation at X="(sp+i3),(v)
Text "Elevation at X="(sp+i4),(u)
Text "Elevation at X="(sp+i5),(t)
Text "Elevation at X="(sp+i6),(p)
Text "Elevation at X="(sp+i7),(r)
Text "Elevation at X="(sp+i8),(q)
Text "Elevation at X="(sp+i9),(m)
Text "Elevation at X="(sp+i10),(n)
Text "Elevation at X="(x),(max)
EndDlog
EndPrgm

Prgm
ClrIO
Local b,f,l,e,s,vpc,vpt,svpc,svpt,c,i
Dialog
Title "Variables"
Request "Backslope",b
Request "Foreslope",f
Request "Length In Stations",l
Request "Elevation at VPI",e
Request "Station at VPI In feet",s
EndDlog
Define c=(f-b)/(2*l)
Define vpc=e+(b*(l/2))
Define svpc=s-((l/2)*100)
Define vpt=e+(f*(l/2))
Define svpt=s+((l/2)*100)
Dialog
Title "Stationing and Elevation"
Text "VPC Elevation=",(vpc)
Text "VPC Station=",(svpc)
Text "VPT Elevation=",(vpt)
Text "VPT Station=",(svpt)
Text "Coefficient of Curvature=",(c)
EndDlog
Pause
Dialog
Request "Starting Point",sp
Request "Interval of Points on Curve",i
Request "Height 1",h
Request "Height 2",o
EndDlog
Define d=§((2/l)(§(h)+§(o))^2)/(b-f)
Define x=(b*l)/(b-f)
define z=vpc+b(sp+i)+c(sp+i)^2
define w=vpc+b(sp+i2)+c(sp+i2)^2
define v=vpc+b(sp+i3)+c(sp+i3)^2
define u=vpc+b(sp+i4)+c(sp+i4)^2
define t=vpc+b(sp+i5)+c(sp+i5)^2
define p=vpc+b(sp+i6)+c(sp+i6)^2
define r=vpc+b(sp+i7)+c(sp+i7)^2
define q=vpc+b(sp+i8)+c(sp+i8)^2
define m=vpc+b(sp+i9)+c(sp+i9)^2
define n=vpc+b(sp+i10)+c(sp+i10)^2
define max=(vpc+b(ix)+c(ix)^2)
Dialog
Text "Elevation at X=",(sp+i),(z)
Text "Elevation at X=",(sp+i2),(w)
Text "Elevation at X=",(sp+i3),(v)
Text "Elevation at X=",(sp+i4),(u)
Text "Elevation at X=",(sp+i5),(t)
Text "Elevation at X=",(sp+i6),(p)
Text "Elevation at X=",(sp+i7),(r)
Text "Elevation at X=",(sp+i8),(q)
Text "Elevation at X=",(sp+i9),(m)
Text "Elevation at X=",(sp+i10),(n)
Text "Elevation at X=",(x),(max)
EndDlog

i know nothing about plotting vertical curves for surveying but as far as i can see the only problems i saw were commas i put the corrected program above try it and then tell me if you still have problems
 
get same error
 
i will put the program into my calc and get back to you in a few days
 
  • #10
ok i put it in my calc and found a few things that were messed up
Prgm
ClrIO
Local b,f,l,e,s,vpc,vpt,svpc,svpt,c,i
Dialog
Title "Variables"
Request "Backslope",b
Request "Foreslope",f
Request "Length In Stations",l
Request "Elevation at VPI",e
Request "Station at VPI In feet",s
EndDlog
Define c=(f-b)/(2*l)
Define vpc=e+(b*(l/2))
Define svpc=s-((l/2)*100)
Define vpt=e+(f*(l/2))
Define svpt=s+((l/2)*100)
Disp "Stationing and Elevation"
Disp "VPC Elevation=",(vpc)
Disp "VPC Station=",(svpc)
Disp "VPT Elevation=",(vpt)
Disp "VPT Station=",(svpt)
Disp "Coefficient of Curvature=",(c)
Pause
Dialog
Request "Starting Point",sp
Request "Interval of Points on Curve",i
Request "Height 1",h
Request "Height 2",o
EndDlog
Define d=§((2/l)(§(h)+§(o))^2)/(b-f)
Define x=(b*l)/(b-f)
define z=vpc+b(sp+i)+c(sp+i)^2
define w=vpc+b(sp+i2)+c(sp+i2)^2
define v=vpc+b(sp+i3)+c(sp+i3)^2
define u=vpc+b(sp+i4)+c(sp+i4)^2
define t=vpc+b(sp+i5)+c(sp+i5)^2
define p=vpc+b(sp+i6)+c(sp+i6)^2
define r=vpc+b(sp+i7)+c(sp+i7)^2
define q=vpc+b(sp+i8)+c(sp+i8)^2
define m=vpc+b(sp+i9)+c(sp+i9)^2
define n=vpc+b(sp+i10)+c(sp+i10)^2
define max=(vpc+b(ix)+c(ix)^2)
Dialog
Disp "Elevation at X=",(sp+i),(z)
Disp "Elevation at X=",(sp+i2),(w)
Disp "Elevation at X=",(sp+i3),(v)
Disp "Elevation at X=",(sp+i4),(u)
Disp "Elevation at X=",(sp+i5),(t)
Disp "Elevation at X=",(sp+i6),(p)
Disp "Elevation at X=",(sp+i7),(r)
Disp "Elevation at X=",(sp+i8),(q)
Disp "Elevation at X=",(sp+i9),(m)
Disp "Elevation at X=",(sp+i10),(n)
Disp "Elevation at X=",(x),(max)
by using Disp insted of Text it stops the () problem you might want to put some ClrIo's and Pauses between the Disp's to make it simpler to use but like i said i don't konw if the equations are right or not so that part is up to you
 
  • #11
thharrimw said:
ok i put it in my calc and found a few things that were messed up
Prgm
ClrIO
Local b,f,l,e,s,vpc,vpt,svpc,svpt,c,i
Dialog
Title "Variables"
Request "Backslope",b
Request "Foreslope",f
Request "Length In Stations",l
Request "Elevation at VPI",e
Request "Station at VPI In feet",s
EndDlog
Define c=(f-b)/(2*l)
Define vpc=e+(b*(l/2))
Define svpc=s-((l/2)*100)
Define vpt=e+(f*(l/2))
Define svpt=s+((l/2)*100)
Disp "Stationing and Elevation"
Disp "VPC Elevation=",(vpc)
Disp "VPC Station=",(svpc)
Disp "VPT Elevation=",(vpt)
Disp "VPT Station=",(svpt)
Disp "Coefficient of Curvature=",(c)
Pause
Dialog
Request "Starting Point",sp
Request "Interval of Points on Curve",i
Request "Height 1",h
Request "Height 2",o
EndDlog
Define d=§((2/l)(§(h)+§(o))^2)/(b-f)
Define x=(b*l)/(b-f)
define z=vpc+b(sp+i)+c(sp+i)^2
define w=vpc+b(sp+i2)+c(sp+i2)^2
define v=vpc+b(sp+i3)+c(sp+i3)^2
define u=vpc+b(sp+i4)+c(sp+i4)^2
define t=vpc+b(sp+i5)+c(sp+i5)^2
define p=vpc+b(sp+i6)+c(sp+i6)^2
define r=vpc+b(sp+i7)+c(sp+i7)^2
define q=vpc+b(sp+i8)+c(sp+i8)^2
define m=vpc+b(sp+i9)+c(sp+i9)^2
define n=vpc+b(sp+i10)+c(sp+i10)^2
define max=(vpc+b(ix)+c(ix)^2)
Dialog
Disp "Elevation at X=",(sp+i),(z)
Disp "Elevation at X=",(sp+i2),(w)
Disp "Elevation at X=",(sp+i3),(v)
Disp "Elevation at X=",(sp+i4),(u)
Disp "Elevation at X=",(sp+i5),(t)
Disp "Elevation at X=",(sp+i6),(p)
Disp "Elevation at X=",(sp+i7),(r)
Disp "Elevation at X=",(sp+i8),(q)
Disp "Elevation at X=",(sp+i9),(m)
Disp "Elevation at X=",(sp+i10),(n)
Disp "Elevation at X=",(x),(max)
by using Disp insted of Text it stops the () problem you might want to put some ClrIo's and Pauses between the Disp's to make it simpler to use but like i said i don't konw if the equations are right or not so that part is up to you

don't put the dialog before the disp
 

Similar threads

Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 2 ·
Replies
2
Views
11K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 8 ·
Replies
8
Views
10K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
7K
  • · Replies 1 ·
Replies
1
Views
17K
  • · Replies 1 ·
Replies
1
Views
8K