H can I make a function on Ti-basic?

  • Thread starter Link-
  • Start date
  • Tags
    Function
In summary: The other is how to call a function. In summary, the person is trying to find a way to program a function on a TI-Basic calculator. They find a website that explains how to program functions. They try to run the program they created, but they get an error message. They look in the manual and find that the function they are trying to program is actually defined in the menus of the calculator. They find the menu and find the Define function. They enter the function's parameters and hit execute. The calculator prints out the function's results.
  • #1
Link-
100
0
Hi,

Do anyone know how can I make a function on Ti-basic?

What I mean by function is mathematical function IE. f(x)=x^2+3x and then take the value of f(2) and f(3) and store them on a variable.

I'm trying to program the http://en.wikipedia.org/wiki/Bisection_method" on the calculator for my Numerical Analysis class and I need to take f(a) and f(Pn).

f(p)=0

Thanks

Link
 
Last edited by a moderator:
Technology news on Phys.org
  • #2
Apparently nobody programs on a TI calculators.

Kind of obvious why.

:redface:
 
  • #3
Last edited:
  • #4
:evalF(F,x,A)->FA
:evalF(F,x,C)->FC

This evalf() command is not on the ti-89, at least doesn't have the same name and it just what I need.

Thanks Ranger
 
  • #6
You say that it is a TI-89?

I am quite sure that the TI-89 allows you to actually define functions. I do not remember exactly where in the interface you do this, and I cannot find my TI-89 right now. However as I remember it, in the menu where you can create programs, you can also create "functions". Functions are like programs, but they return a value. This means (1) you can call them like functions from the interpreter prompt, which is what you seem to want to do and (2) you can call them from other programs the way functions in a normal programming language would work. Look in the menus, do you see what I am referring to?
 
  • #7
Yes, Coin there is a way to define a function actually is Define like this

:Define f(x)=Funct
: /*Function of x*/
:
EndFunct

But for some reason when i try to run the program, I get an error message telling me that I didn't define variable. :confused:

I had read the manual a couple of times, is not real good source for programming and commands.
 
  • #8
ranger said:

Thanks Ranger, but the problem is that I'm suppose to make the program. I already manage to evaluate the desire function but is was not a real profesional way. It is kind of lame.

I made this:

Code:
ClrIO
Dialog
Request "Function: f(x)",f
Request "Initial point",a
Request "Final Point",b
Request "Tolerance",tol
EndDlog
If Ok=0:Stop
expr(a)->a:expr(f)->f:expr(b)->b:expr(tol)->tol
[B]a->x
f->fa[/B]
While abs(a-b)/(abs(a+b)/2)>tol
     a+(b-a)*0.5->p
    [B] p-x
     f->fp[/B]
   If fp=0 Then
          Disp "p=",p
          Stop
   EndIf
   If fa*fp>0 Then
         p->a
         fp->a
   Else
        p->b
   EndIf
EndWhile
Disp "f(p)=0, p=",p
EndPrgm

The bold is how do manage to evaluate my function
 

FAQ: H can I make a function on Ti-basic?

What is Ti-basic?

Ti-basic is a programming language used on Texas Instruments graphing calculators. It is similar to other programming languages, but it has specific syntax and commands for the calculator's functions.

How do I start programming in Ti-basic?

To start programming in Ti-basic, turn on your calculator and press the "PRGM" button. Then, select "NEW" and choose a name for your program. You can now start writing your code using the calculator's keypad and following the syntax rules.

How can I make a function in Ti-basic?

To make a function in Ti-basic, you can use the "Define" command. This command allows you to create a function with a name and input variables. You can then write the code for your function inside the "Define" block.

Can I use loops and conditional statements in Ti-basic functions?

Yes, you can use loops and conditional statements in Ti-basic functions. The language supports "For" loops, "While" loops, and "If-Then-Else" statements, among others. These tools can be useful for creating more complex and efficient functions.

How can I test my Ti-basic function?

To test your Ti-basic function, you can use the "Run" command. This will run the code inside your function and allow you to see the output. You can also use the "Debug" command to step through your code and see how it executes line by line.

Similar threads

Replies
36
Views
4K
Replies
8
Views
1K
Replies
4
Views
2K
Replies
2
Views
1K
Replies
32
Views
4K
Replies
11
Views
872
Replies
1
Views
2K
Back
Top