2

On the Ti-84 and Ti-89, I know that one can use "Define" to define a function with multiple variables. However, is there a way to use "Prompt" or something of the sort to define a function?

Suppose we have a very simple program that evaluates an expression (only an example):

Prompt a,b,c
Disp a^5-sqrt(c)/b

Instead of having to manually go into the Program Editor every single time to change the expression, how can we automatically Prompt the user to Define a function such as eq(a,b,c)=a^5-sqrt(c)/b?

Diafotismos
  • 109
  • 1
  • 10

1 Answers1

3

Yes you can! Use y-variables.

Functions are stored as y-variables on the TI-84, and these variables can be accessed by going to the VARS>Y-VARS>Function... menu. Then you can prompt the user for the equation with the y-variable being the input, like this:

Prompt Y1

Keep in mind that this is a string, meaning you need quotation marks at the beginning and end of your function when putting it in as the user. This can be cumbersome, and can be avoided by using Input instead, and storing it into a String variable (found in VARS>String...) first then to a y-variable.

Input "f(a,b,c): ",Str1
Str1→Y1
user3932000
  • 671
  • 8
  • 24
  • Thank you! This worked on my 84! Would you mind just giving me the format for the 89? I'm not too familiar with the 89 version of TIBASIC. – Diafotismos Jan 08 '16 at 05:58
  • Sorry, but I only have a TI-84 and don't know much about the 89. That said, the [TI-Basic Developer wiki](http://tibasicdev.wikidot.com/68k:home) has a ton of useful resources and documentation that may help you out. (I use it all the time) – user3932000 Jan 09 '16 at 00:14