我试图用ti-89编写一个数值方法,用TI-Basic语言编写,问题是当我在循环中覆盖变量时,它不起作用,我对这种语言不熟悉,我不知道是否遗漏了一些细节。
Item()
prgm
Input "f(x)",a //call the function in text mode
define s(z,t) = a //convert the text into a function
local xa,ya //declare local variables
x->xa //assign values that I already have saved to local variables
y->ya
local i
For i,1,10
s(xa,ya)->xa //evaluate the function, and I have to rewrite the first parameter
EndFor
EndPrgm发布于 2022-07-08 07:51:35
我不完全确定是什么导致了这个问题,但如果只有这个,我会尝试使用列表来存储数据。您可以重写列表并轻松清除它。您也可以在这些列表中存储字符串。列表可以随时编辑,这将解决您的问题。虽然这个解决方案可能不那么有效,但它应该有效。我没有带计算器,所以我不能测试它,对不起。下面这两个函数将内容添加到列表中并清除列表。
L1(x,y,z)
ClrList L1祝好运!TI-Basic有时会很困难。
https://stackoverflow.com/questions/72568031
复制相似问题