ti-basic

TI-84 programming parameter

﹥>﹥吖頭↗ 提交于 2021-02-08 04:14:28
问题 Is it possible to execute a program within another program that requires parameters? (without inlining it) E.g. ________________ - PROGRAM:ADD - :Prompt A,B - :A+B>C ________________ - PROGRAM:TEST - :For(I,0,20) - :Disp (prgmADD (I,I+1)) - :End_________ Obviously this doesn't work the way it currently is, but I hope I made it clear what I'm getting at. 回答1: I don't think there is a way to do that - you're basically asking to fake user input, which isn't supported. The way I have gotten

TI-84 programming parameter

自闭症网瘾萝莉.ら 提交于 2021-02-08 04:10:47
问题 Is it possible to execute a program within another program that requires parameters? (without inlining it) E.g. ________________ - PROGRAM:ADD - :Prompt A,B - :A+B>C ________________ - PROGRAM:TEST - :For(I,0,20) - :Disp (prgmADD (I,I+1)) - :End_________ Obviously this doesn't work the way it currently is, but I hope I made it clear what I'm getting at. 回答1: I don't think there is a way to do that - you're basically asking to fake user input, which isn't supported. The way I have gotten

Ti-basic passing function as an argument to another function

允我心安 提交于 2020-02-25 06:49:07
问题 In Matlab you can declare an anonymous function and pass it to another function. [y] = someFunction(@(x) x.^2 , [a bunch of numbers]); I'd like to do something similar on my TI-89 calculator. I have a function that takes a "math-function" as one of its arguments and I'm trying to do it like this: myfunction(3/x,1,2) and my function looks something like this: myfunction(f,xl,xu) Func local a,b f(xl)→a f(xu)→b Return [a,b] EndFunc I know I can input my functions in the "y=" editor and then

TI-84 Plus Random Number Generator Algorithm

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 12:17:30
问题 Edit: my main question is that I want to replicate the TI-84 plus RNG algorithm on my computer, so I can write it in a language like Javascript or Lua, to test it faster. I tried using an emulator, but it turned out to be slower than the calculator. Just for the people concerned: There is another question like this, but answer to that question just says how to transfer already-generated numbers over to the computer. I don't want this. I already tried something like it, but I had to leave the

What is the fastest infinite loop in TI-84+ Basic?

天大地大妈咪最大 提交于 2019-12-14 02:16:34
问题 Since there are technically 4 types of loops (for, while, repeat, and goto/lbl), which one is the fastest to use "infinitely"? Here is what I mean: while 1 End repeat 0 End lbl 1 goTo 1 for(n, 1, [number large enough to function as practically infinite] End Which of these is the fastest, or is there an even faster one? 回答1: In terms of both size and speed, the repeat and while loops are the fastest. While 1 and Repeat 0 are both 2 bytes, while End is 1. In terms of space, they are both 4

Multiple Language Programming on Ti-Calculator

自作多情 提交于 2019-12-14 01:23:48
问题 I am interested into programming with different languages besides Ti-Basic (like Java, C, and Python) on my Ti-84 plus calculator. Does my calculator support this, and if not, are there any calculators on the market that would be able to do this? Thanks in advance! (The idea is that when I don't have access to my computer at home, I could just pull out my pocket calculator and start programming and testing out some algorithms on the go that come in mind.) It doesn't have to be a calculator,

Testing if value is in list/array (Ti-Basic)

谁说胖子不能爱 提交于 2019-12-11 07:06:57
问题 Is there a way to test if a value is in a list? In Python, I think you can do something like 'if n in myList: print("Value N is in the list.")' I don't want to use a for loop to check each value seperately, unless it's the only option. I'm using a Ti-84 Plus. 回答1: This should work assuming I've thought through it correctly. It's very simple, where L₁ is the list to search and X is the value to look for. max(not(L₁-X Step-by-step analysis: L₁-X : Subtract the value from everything in the list.

Display variable and string on same line (TI-Basic)

拟墨画扇 提交于 2019-12-06 02:13:49
问题 In most programming languages, you can mix and match strings with variables during output. However, I can't seem to find a good way to do so. Here is my code: Prompt A,B √(A^2+B^2)->C If iPart(C)≠C Then Disp "C = √(",C Else Disp "C = ",C End Goto ED Label ED Unfortunately, with this code, it ends up printing like so: A? 3 B? 5 C = √( 34 Done This is not what I want. I would love to be able to have it print C = √(34) , but I currently can't find any way to mix variables and strings. Any help

Display variable and string on same line (TI-Basic)

◇◆丶佛笑我妖孽 提交于 2019-12-04 06:41:31
In most programming languages, you can mix and match strings with variables during output. However, I can't seem to find a good way to do so. Here is my code: Prompt A,B √(A^2+B^2)->C If iPart(C)≠C Then Disp "C = √(",C Else Disp "C = ",C End Goto ED Label ED Unfortunately, with this code, it ends up printing like so: A? 3 B? 5 C = √( 34 Done This is not what I want. I would love to be able to have it print C = √(34) , but I currently can't find any way to mix variables and strings. Any help would be appreciated. In ti-basic for the ti-83 the plus (+) is used to concatenate strings. Like this:

Why is it saying that there is a syntax error for the if/else statement I wrote?

和自甴很熟 提交于 2019-12-02 15:56:15
问题 I'm trying to write a program that calculates the sum of a geometric series on a TI-84. Prompt A Prompt R Prompt N If N=100 and abs(R)<1 Disp (A/1-R) Else Disp (A(1-R^N))/(1-r) It says that there is a syntax error at the Else line. 回答1: Else can only be paired with an If .. Then construct, not a plain If . So: Prompt A,R,N If N=100 and abs(R)<1 Then Disp A/(1-R Else Disp (A(1-R^N))/(1-R In general the If.. Then .. Else .. End construct should be closed by End but in this case the program