Search code examples
ti-basic

Is there a command that clears the Y-variables?


I have a command that essentially functions like clearing the memory, but doesn't wipe programs and sets the settings I like. I found out that while it does its job well, it doesn't seem to clear the equations in the Y= menu. Is there a command or another way to achieve this?

PROGRAM:CLEAR
:MATHPRINT
:Normal
...
:DiagnosticOn
:ClrDraw
:Clear Entries
:ClrAllLists
:SetUpEditor
:ClrHome
:"

Solution

  • On a similar note to TimTech, Delvar can be used to reset the value of a variable.

    DelVar Y1
    

    The benefit of this is that multiple DelVar calls can be chained without a line break.

    DelVar Y1DelVar Y2Disp "Done
    

    A non-programmatic way of clearing a calculator is to use the key sequence 2nd + 7 1 2. Unfortunately, this also clears programs.

    This method will clear all RAM on the calculator, so use it with caution.


    I found a better programmatic way of clearing the Y-VARS. This method also resets all other graph settings to their default value. In your case, this seems to be a desirable side-effect. Unfortunately, it requires a little bit of set up and occupies one of the Graph Database variables (119 Bytes). Because this variable can be kept archived, this does not consume any RAM.

    Setup

    1. Manually clear All Y-VARS, including parametric, polar and sequence variables.
    2. Manually Reset All graph window settings to their default
      • ZStandard
      • RectGC
      • CoordOn
      • GridOff
      • AxesOn
      • LabelOff
      • ExprOn
    3. Store current setting in a Graph Database variable
      • StoreGDB GDB1 entered with key strokes: 2ndPRGM5VARS3ENTERENTER
    4. Archive GDB1
      • Archive GDB1 entered with keystrokes: 2nd+5VARS3ENTERENTER

    Use in Program

    To use this archived variable in a program, you must unarchive it, recall its contents, and finally archive the variable again. This is accomplished by the following code block.

    UnArchive GDB1  
    RecallGDB GDB1  
    Archive GDB1
    

    If you're using a TI-83 calculator, you need to skip the steps involving archiving because the TI-83 does not support flash memory. The TI-83 Plus and above work fine, however.