English 中文(简体)
TI-Basic: How do you get an equation as an input?
原标题:
  • 时间:2011-03-29 19:43:00
  •  标签:
  • ti-basic

I was playing around with programming on my TI-84 in math class today and I decide to try to write a program that reads an equation and than does a few things with it. But I m having trouble reading an equation. I tried :Prompt Y1 but I kept getting a data type error when I try to use the program. Does anyone have any ideas on how to accomplish this? Thanks in advance.

最佳回答

I m not sure if the TI-84 is the same, but on the 83 this will work if you put the equation in quotes when you enter it. So for example, using the following program:

PROGRAM:TEST
:Prompt Y1
:ClrDraw
:DispGraph

Running it:

prgmTEST
Y1=?"2X+1"

Will cause the graph for y=2x+1 to be drawn (and any other equations you already had entered at the time, IIRC).

问题回答

Alternatively, you can do

:Input "Eqn:",Str1
:String>Equ(Str1,Y1)
:DispGraph

This way you don t have to put in quotation marks each time you enter an equation.

As noted by Timtech, there is an easier way of writing this.

:String►Equ(Str1,Y1
can be
:Str1→Y1

This replacement is universal, takes the same time to run (because it actually uses the same routines), is more convenient to type since you don t have to go through the command catalog, and is two bytes smaller.

Excerpt from the TI-Basic Developer Information Repository.

Texas Instruments has guide books online for some of their programmable calculators. Here s the PDF for the TI-84 plus: http://education.ti.com/guidebooks/graphing/84p/TI84PlusGuidebook_Part2_EN.pdf. Check out chapter 16 on programming.





相关问题
TI-84 Multiple Menu Program

So when you make a menu using the Menu() function, It goes: Title Option 1 Option 2 Option 3 Etc... But almost every menu already on the calculator has multiple titles that you can choose from, then ...

TI-Basic: How do you get an equation as an input?

I was playing around with programming on my TI-84 in math class today and I decide to try to write a program that reads an equation and than does a few things with it. But I m having trouble reading ...

Custom function writing on calculator

I m sitting here with my TI-89 Titanium and having fun writing some custom functions for this test on friday. Question: bmp(b1,b2,b3) Func binompdf(b1,b2/100,b3)*100 What do I need to input to make ...

Minimalistic approach for a Snake-style game

I received my TI-82 STATS programmable calculator (which is in fact more of a TI-83) about two days ago - and wanted to program a Snake game with the builtin TI-BASIC language. Although I had to find ...

TI83+ evaluate expression program

I would like to build a program in a TI-83+ that will prompt for the variables x, y, and z, and then prompt for an expression on the terms x, y, and z. Is it possible to prompt for that expression and ...

Effective functional sort

I m programming a function for a TI-Nspire, so I can t use the builtins from inside a function. What is the most generally efficient algorithm for sorting a list of numbers without modifying the list ...

热门标签