summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex102
1 files changed, 87 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex b/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex
index 6e8b69f283d..9978ef0148b 100644
--- a/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex
@@ -1,7 +1,6 @@
-%% $Id: pst-func-doc.tex 72 2009-01-08 22:00:47Z herbert $
-\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
- headexclude,footexclude,oneside]{pst-doc}
-\usepackage[utf8]{inputenc}
+%% $Id: pst-math-doc.tex 859 2018-12-13 15:31:03Z herbert $
+\documentclass[fontsize=11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,
+ headings=small, headinclude=false,footinclude=false,oneside,abstract=on]{pst-doc}
\usepackage{pst-math}
\let\pstMathFV\fileversion
\usepackage{pstricks-add}
@@ -19,6 +18,9 @@ x&\mapsto&#4\end{array}\right.}
x&\mapsto&{\operator@font#1}(x)\end{array}\right.}
\makeatother
+\addbibresource{\jobname.bib}
+
+
\begin{document}
\title{\texttt{pst-math}}
@@ -46,6 +48,9 @@ Patrice M\'egret;
Dominik Rodriguez
\end{abstract}
+
+\clearpage
+
\section{Introduction}
\nxLPack{pst-math} defines \Lcs{pstPi} on \TeX\ level which expects 1,2,3 or 4 as
parameter. It is not available on PostScript level.
@@ -311,7 +316,7 @@ num
%a b var f Ierr
the first two variables are the low and high boundary \Index{integral}, both can be values or
-\PS expressions. \verb+/var+ is the definition of the integrated variable (not x!), which is
+\PS\ expressions. \verb+/var+ is the definition of the integrated variable (not x!), which is
used in the following function description, which must be inside of braces. The last
number is the tolerance for the step adjustment. The function \Lps{SIMPSON} can be
nested.
@@ -331,6 +336,8 @@ nested.
\end{pspicture*}
\end{LTXexample}
+
+
\begin{LTXexample}[pos=t,wide=false]
%%% Gaussian and relative integral from -x to x to its value sqrt{pi}
\psset{unit=2}
@@ -438,25 +445,92 @@ nested.
\end{pspicture}
\end{lstlisting}
+
+\iffalse
+
\begin{LTXexample}[pos=t,wide=false]
% ce code definit la fonction [cos(2pix cos(t))-cos(2pix)]^2 / sin(t) avec x=h/lambda
-\def\F{
+\def\Func{
0.01 3.1
/t
- { TwoPi x mul t COS mul COS TwoPi x mul COS sub 2 exp t SIN div }
+ { TwoPi x mul t COS mul COS TwoPi x mul COS sub 2 exp t SIN div } def
.01 SIMPSON 60 mul }
-% D = 2*(cos^2(2pix))/F
-\def\fD{TwoPi x mul COS dup mul 2 mul \F\space div}
+% D = 2*(cos^2(2pix))/Func
+\def\fD{TwoPi x mul COS dup mul 2 mul \Func\space div}
\psset{llx=-1.5cm,lly=-0.5cm,urx=0.2cm,ury=0.2cm,
xAxisLabel={$h/\lambda$},xAxisLabelPos={0.5,-45},yAxisLabel={$R_r$ en ohms},
yAxisLabelPos={-0.1,150}}
\begin{psgraph}[Dy=50,Dx=0.1,xticksize=300 0,yticksize=1 0,
- comma=true,axesstyle=frame](0,0)(1,300){10cm}{5cm}
- \psplot{0}{1}{\F}
+ comma=true,axesstyle=frame](0,0)(1,300){10cm}{5cm}
+ \psplot{0}{1}{\Func}
\psplot[linecolor=red]{0.01}{.1}{\fD}%
\end{psgraph}
\end{LTXexample}
+\fi
+
+\section{Random numbers}
+Package \LPack{pst-math} supports the creation of random number lists where a number will
+appear only once.
+
+\begin{BDef}
+\Lcs{defineRandIntervall}\Largr{min,max}{maxNo}\\
+\Lcs{makeSimpleRandomNumberList}\% multiple values possible\\
+\Lcs{makeRandomNumberList} \% no multiple values!\\
+\Lcs{getNumberFromList}\Largb{number}
+\end{BDef}
+
+The list of the random numbers is \Lcs{RandomNumbers}, a comma separated list of the values.
+It can be used for own purpuses.
+
+
+\begin{LTXexample}[pos=t]
+\defineRandIntervall(1,50){30}
+\makeSimpleRandomNumberList
+Random list: \RandomNumbers
+
+\psforeach{\iA}{1,2,..,30}{\getNumberFromList{\iA}~}
+\end{LTXexample}
+
+
+In the next example a random number appears only \emph{once} in the list. There no multiple
+numbers:
+
+
+\begin{LTXexample}[pos=t]
+\defineRandIntervall(1,30){30}
+\makeRandomNumberList
+\psforeach{\iA}{1,2,..,30}{\getNumberFromList{\iA}~}
+\end{LTXexample}
+
+
+
+
+\begin{LTXexample}[pos=t]
+\newcounter{RandNo} \setcounter{RandNo}{1}
+\def\n{5} \def\N{\the\numexpr\n*\n}
+\defineRandIntervall(1,\N){\N}
+\makeRandomNumberList \setcounter{RandNo}{1}
+\begin{pspicture}(\n,\n)
+ \psgrid[subgriddiv=0,gridlabels=0pt]
+ \multido{\rRow=0.5+1.0}{\n}{\multido{\rCol=0.5+1.0}{\n}{%
+ \rput(\rCol,\rRow){\getNumberFromList{\theRandNo}}%
+ \stepcounter{RandNo}}}
+\end{pspicture}
+\setcounter{RandNo}{1}
+\def\n{6} \def\N{\the\numexpr\n*\n}
+\defineRandIntervall(1,\N){\N}
+\makeRandomNumberList \setcounter{RandNo}{1}
+\begin{pspicture}(\n,\n)
+ \psgrid[subgriddiv=0,gridlabels=0pt]
+ \multido{\rRow=0.5+1.0}{\n}{\multido{\rCol=0.5+1.0}{\n}{%
+ \rput(\rCol,\rRow){\getNumberFromList{\theRandNo}}%
+ \stepcounter{RandNo}}}
+\end{pspicture}
+\end{LTXexample}
+
+
+
\clearpage
@@ -479,18 +553,16 @@ num & \Lps{norminv} & real & Return $\mathop{norminv}(num)$\\
\end{LTXexample}
+
These function returns the inverse normal.
\bgroup
\raggedright
\nocite{*}
-\bibliographystyle{plain}
-\bibliography{pst-math-doc}
+\printbibliography
\egroup
\printindex
-
-
\end{document}