I have a program made on my voyage 200 that solves for average rate of change using integrals

Code:
rate()
Prgm
Local aroc,e,equ,v,var,a,b
InputStr "EQU:",e
expr(e)->equ
InputStr "VAR:",v
expr(v)->var
Input "A:",a
Input "B:",b
1/(b-a)*∫(equ,var,a,b)->aroc
Disp "AROC:"&string(aroc)
EndPrgm

I know this could be optimised, but i just need it to be easily read.

on the Ti85, you can use expressions like the "aroc" var in the voyage 200 program.
like this:

Code:
EXPR=f(x)


I want to use this functionality to port this to the Ti85 but have failed,
Here's my Ti85 code :

Code:
ClLCD
InpSt "EQU:",E
St>Eq(E,EQU
InpSt "VAR:",V
St>Eq(V,VAR
Input "A:",A
Input "B:",B
AROC=1/(B-A)*fnInt(EQU,VAR,A,B
Disp "AROC:",AROC


I keep on getting an undefined error. I do know that the 85 is non-cas but expressions shouldn't need defined variables, right?

Thanks for you's help ahead of time.

Cheers!

~izder456
My TI-85 BASIC is exceedingly rusty, but:
  1. Storing is done left-to-right, e.g. 1/(B-A)*fnInt(EQU,VAR,A,B->R
  2. You cannot use multiple characters for variable names.
KermMartian wrote:
  1. Storing is done left-to-right, e.g. 1/(B-A)*fnInt(EQU,VAR,A,B->R
  2. You cannot use multiple characters for variable names.

ok i'll try that out

Edit : I still get the same error

Code:
ClLCD
InpStr "EQU:",W
St>Eq(W,E
InpStr "VAR:",Z
St>Eq(Z,V
Input "A:",A
Input "B:",B
1/(B-A)*fnInt(E,V,A,B->R
Disp "AROC:",R
Where does the undefined error occur? I should also point out that you need to use the String variables, by the way - unlike the 68k calculators, the variables on the TI-85 don't get assigned type by context.
KermMartian wrote:
Where does the undefined error occur?

It occurs after I input all the variables :
EQU=3x^2
VAR=x
A=0
B=2
so it should output four
KermMartian wrote:
I should also point out that you need to use the String variables, by the way - unlike the 68k calculators, the variables on the TI-85 don't get assigned type by context.

there are no predefined string vars, you have to define them yourself
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement