Diafotismos
Diafotismos

Reputation: 109

TIBASIC: How can one prompt a multivariable expression?

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?

Upvotes: 2

Views: 3835

Answers (1)

user3932000
user3932000

Reputation: 629

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

Upvotes: 3

Related Questions