[Main]
Name=cmd_sinreg
Type=Function
Subtype=ROM Call
Header Files=bascmd.h
Definition=void cmd_sinreg (ESI RegData);
MinAMS=1.01
See Also=cmd_linreg, cmd_quadreg, cmd_cubicreg, cmd_quartreg, cmd_powerreg, cmd_expreg, cmd_lnreg, cmd_onevar, cmd_twovar, cmd_medmed, cmd_logistic

[ROM Call]
Index=$38C

[Description]
Executes TI-Basic 'SinReg' command.

[Explanation]
cmd_sinreg calculates a sine regression and updates all the statistics
variables (see TI-Basic manual for more info). The <I>RegData</I> parameter
must point to a structure on the expression stack which describes where the
actual data is stored. This structure may have one of the following eight
layouts (<I>RegData</I> should point to the last item):
<BR><BR>
<TABLE BORDER CELLPADDING="2">
  <TR><TD><A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <I>y_list_name</I> <I>x_list_name</I></TD></TR>
  <TR><TD><A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <I>iterations</I> <I>y_list_name</I> <I>x_list_name</I></TD></TR>
  <TR><TD><A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <I>period</I> <A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <I>y_list_name</I> <I>x_list_name</I></TD></TR>
  <TR><TD><A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <I>period</I> <I>iterations</I> <I>y_list_name</I> <I>x_list_name</I></TD></TR>
  <TR><TD><A HREF="$$LINK(estack.h/Tags)">END_TAG</A> <I>categories_list</I> <A HREF="$$LINK(estack.h/Tags)">LIST_TAG</A> <I>categories_name</I> <A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <I>y_list_name</I> <I>x_list_name</I></TD></TR>
  <TR><TD><A HREF="$$LINK(estack.h/Tags)">END_TAG</A> <I>categories_list</I> <A HREF="$$LINK(estack.h/Tags)">LIST_TAG</A> <I>categories_name</I> <A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <I>iterations</I> <I>y_list_name</I> <I>x_list_name</I></TD></TR>
  <TR><TD><A HREF="$$LINK(estack.h/Tags)">END_TAG</A> <I>categories_list</I> <A HREF="$$LINK(estack.h/Tags)">LIST_TAG</A> <I>categories_name</I> <I>period</I> <A HREF="$$LINK(estack.h/Tags)">NOTHING_TAG</A> <I>y_list_name</I> <I>x_list_name</I></TD></TR>
  <TR><TD><A HREF="$$LINK(estack.h/Tags)">END_TAG</A> <I>categories_list</I> <A HREF="$$LINK(estack.h/Tags)">LIST_TAG</A> <I>categories_name</I> <I>period</I> <I>iterations</I> <I>y_list_name</I> <I>x_list_name</I></TD></TR>
</TABLE>
<BR>
<I>x_list_name</I> is the VAT symbol name (see
<A HREF="$$LINK(vat.h/SYMSTR)">SYMSTR</A> and
<A HREF="$$LINK(estack.h/Tags)">Tags</A> for more info) of a
TI-Basic list variable which contains the x values. <I>y_list_name</I> is the
VAT symbol name of a TI-Basic list variable which contains the y values.
<I>iterations</I> is an integer item in the range
1-16 (8 is assumed if it is ommited). It specifies the maximum number of
iterations in which a solution will be attempted (larger values result in
better accuracy but longer execution times, and vice versa). <I>period</I> is
an integer or floating point item which specifies an estimated period. If omitted,
the difference between values in the list which contains x values should be
equal, and the values should be in sequential order, otherwise the
differences between x values may vary. <I>categories_name</I> (if present) is
the VAT symbol name of a TI-Basic list which contains the category for each
item. <I>categories_list</I> represents a list of integer items determining
which categories will be included (this makes sense only if
<I>categories_name</I> is used).

[References]
Out=alloc.h/HeapAllocHighThrow, alloc.h/HeapAllocThrow, alloc.h/HeapFree, alloc.h/HeapFreeIndir, alloc.h/HeapLock, alloc.h/HeapUnlock, alloc.h/HLock, estack.h/remaining_element_count, basfunc.h/push_approx, basfunc.h/push_red_row_ech, error.h/ER_catch, error.h/ER_success, error.h/ER_throwVar, estack.h/delete_expression, estack.h/estack_to_ushort, estack.h/HToESI, estack.h/next_expression_index, estack.h/NG_approxESI, estack.h/NG_tokenize, estack.h/push_Float, estack.h/push_internal_simplify, estack.h/push_quantum, estack.h/push_quantum_pair, estack.h/top_estack, stdio.h/sprintf, string.h/strcat, system.h/XR_stringPtr, timath.h/atan2, timath.h/cos, timath.h/fabs, timath.h/is_transfinite, timath.h/sin, timath.h/sqrt, unknown.h/ck_valid_float, unknown.h/estack_to_float, unknown.h/hStrAppend, unknown.h/is_cFloat_agg, unknown.h/PlotInit, unknown.h/PlotPut, unknown.h/RM_Type, unknown.h/statFree, unknown.h/statStart, vat.h/DerefSym, vat.h/SymFindMain, vat.h/VarRecall, vat.h/VarStore, unknown.h/_bcd_math, unknown.h/_ROM_CALL_4CB
Out_EV_eventLoop=1
