File:  [LON-CAPA] / loncom / html / adm / help / tex / Function_Plot_Response_Custom_Rule.tex
Revision 1.2: download - view: text, annotated - select for diffs
Sat Aug 20 17:48:11 2016 UTC (7 years, 11 months ago) by raeburn
Branches: MAIN
CVS tags: version_2_12_X, version_2_11_X, version_2_11_5, version_2_11_4_uiuc, version_2_11_4_msu, version_2_11_4, version_2_11_3_uiuc, version_2_11_3_msu, version_2_11_3, version_2_11_2_uiuc, version_2_11_2_msu, version_2_11_2_educog, version_2_11_2, HEAD
- Use LaTeX-style single and double quotes.

\label{Function_Plot_Response_Custom_Rule}

Used to create rules that aren't options using the other rules.  The coding is done in Perl and follows Perl syntax.  Any variable written inside this rule will be recognized as normal and any evaluation function can be used as well.

Available evaluation functions:
\begin{enumerate}
\item \&fpr\_val(``label'')
\item \&fpr\_f(\$x)
\item \&fpr\_dfdx(\$x)
\item\&fpr\_d2fdx2(\$x)
\item (\$xs,\$xe,\$ys,\$ye)=\&fpr\_vectorcoords(``Name'')
\item (\$x,\$y)=\&fpr\_objectcoords(``Name'')
\item \&fpr\_vectorlength(``Name'')
\item \&fpr\_vectorangle(``Name'')
\end{enumerate}

Returning 1 is correct, while returning 0 is incorrect.

Example comparing the lengths of two vectors:
\begin{verbatim}
if (&fpr_vectorlength("Normal") < &fpr_vectorlength("Gravity"))
{return 1;}
else
{return 0;}
\end{verbatim}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>