Trouble Programming TI-89

  • Calculators
  • Thread starter Clutch Cargo
  • Start date
  • #1
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.
 

Answers and Replies

  • #2
CompuChip
Science Advisor
Homework Helper
4,306
48
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?
 
  • #3
13
0
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.
 
  • #4
George Jones
Staff Emeritus
Science Advisor
Gold Member
7,490
1,228
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
 
  • #5
115
0
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
 
  • #6
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
 
  • #7
115
0
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
 
  • #8
get same error
 
  • #9
115
0
i will put the program into my calc and get back to you in a few days
 
  • #10
115
0
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
115
0
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
 

Related Threads on Trouble Programming TI-89

  • Last Post
Replies
4
Views
7K
Replies
1
Views
4K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
2
Views
9K
Replies
1
Views
2K
Replies
1
Views
6K
Replies
8
Views
9K
Replies
3
Views
8K
Replies
1
Views
4K
  • Last Post
Replies
1
Views
7K
Top