 |
cmd_table |
Function (ROM Call 0x393) |
Executes TI-Basic 'Table' command.
cmd_table builds a table for the specified expression/function and displays
it on the screen by activating the Table application. This function expects
the following layout on the expression stack before calling, depending on the
current graph mode (ExprEtc should point to the last item):
Graph mode | Requested layout on the expression stack |
Function graphing | END_TAG var_name expression |
Parametric graphing | END_TAG var_name y_expression x_expression |
Polar graphing | END_TAG var_name expression |
Sequences, 3D functions and differential equations can not be tabulated using
this function.
Variable names are optional, i.e. they may be omitted. In such cases, default
variable names for current graph mode are used ("x" for function graphing,
"t" for parametric graphing, and "q" for polar graphing). For example, to
graph the function sin(t)+sin(2t)
with respect to t (assuming
that the current graph mode is "Function" or "Polar"), you should do:
push_quantum (VAR_T_TAG);
push_parse_text ("sin(t)+sin(2t)");
cmd_table (top_estack);
Or, you can avoid
push_parse_text by
transforming the expression into RPN manually (which is very easy):
static ESQ rpn[] = {END_TAG, VAR_T_TAG, VAR_T_TAG, SIN_TAG,
VAR_T_TAG, 2, 1, POSINT_TAG, MUL_TAG, SIN_TAG, ADD_TAG};
cmd_table (rpn + sizeof(rpn) - 1);
All expressions entered using cmd_table and
cmd_graph are remembered and assigned
increasing function numbers starting with 1. The currently selected 'Y='
functions are ignored. Use cmd_clrgraph to
clear these functions (they will also be cleared after you go to the Y=
Editor application to re-enable the system 'Y=' functions).
See the TI-Basic manual for more info.
You can use cmd_blddata as an alternative
to this function.
Uses: EV_sendEvent, EV_startApp, gr_active, GraphOrTableCmd
See also: cmd_blddata, cmd_graph, cmd_clrgraph