【问题标题】:How to rewrite a variable in a for cycle for Ti-Basic如何在 Ti-Basic 的 for 循环中重写变量
【发布时间】:2022-07-08 15:51:35
【问题描述】:

我正在尝试在我的 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

【问题讨论】:

    标签: ti-basic


    【解决方案1】:

    我不完全确定是什么导致了问题,但我会尝试使用一个列表来存储数据,如果这就是全部的话。您可以重写列表并轻松清除它。您也可以将字符串存储在这些列表中。尽管此解决方案可能效率不高,但它应该可以工作。我没有带计算器,所以无法测试,抱歉:(

    L1(x,y,z) 
    
    ClrList L1
    

    祝你好运! TI-Basic 有时可能很困难

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-02-14
      • 1970-01-01
      • 1970-01-01
      • 2016-02-26
      • 2020-04-05
      • 1970-01-01
      相关资源
      最近更新 更多