Skip to content
Snippets Groups Projects
Commit 80dc909a authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

+ full mat from page 'curves'

parent 6bb17fe5
No related branches found
No related tags found
1 merge request!4Initial copy from wiki to Expressions.tex.
......@@ -157,3 +157,20 @@ is executed as follows:
\end{lstlisting}
In contrast, a command like \cmd{oz0} or \cmd{op2} or \cmd{oi} implies a loop over ''j'' only.
\subsection{Curves}
Introductory example
\begin{lstlisting}
> fm 101 3 testdata # create test data set
0 > =ox (i-50)/10 # x-scale now goes from -5 to 5 in steps of 0.1
0 > =oy exp(-(x-j)^2/2/(1.4^j)^2)*ran(.8,1.2+0*i) # y(x) is now a noisy Gaussian
0 > cc p0*exp(-(t-p1)^2/2/p2^2) # create fit curve
1 > op0 1 # set initial value of fit parameter
1 > op1 1 # (in this case not really necessary,
1 > op2 1 # because by default the initial value is 1 anyway)
1 > cf # perform a fit
1 > 0,1 p 1 # plot spectrum 1 (data and curve)
0,1 > cp # show fit parameters
\end{lstlisting}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment