\section{/home/peifer/diffit/modules/set\-Mesh.cc File Reference}
\label{setMesh_8cc}\index{/home/peifer/diffit/modules/setMesh.cc@{/home/peifer/diffit/modules/setMesh.cc}}
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$iostream$>$}\par
{\tt \#include $<$fstream$>$}\par
{\tt \#include \char`\"{}../nr.h\char`\"{}}\par
{\tt \#include \char`\"{}../def.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf set\-Mesh} ({\bf Glob\-Exp} $\ast$ex, {\bf Glob} $\ast$globs, long exp\-Nr)
\end{CompactItemize}


\subsection{Function Documentation}
\index{setMesh.cc@{set\-Mesh.cc}!setMesh@{setMesh}}
\index{setMesh@{setMesh}!setMesh.cc@{set\-Mesh.cc}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void set\-Mesh ({\bf Glob\-Exp} $\ast$ {\em ex}, {\bf Glob} $\ast$ {\em globs}, long {\em exp\-Nr})}\label{setMesh_8cc_343605cc3bf29ae8d91094465c787e95}




Definition at line 11 of file set\-Mesh.cc.

References dvector(), FALSE, Glob\-Exp::fitend, Glob\-Exp::fitstart, Glob\-Exp::mesh, Glob::no\-Measurements, and Glob\-Exp::n\-Points.

\footnotesize\begin{verbatim}12 {
13   long i,nPoints=ex[expNr].nPoints;
14   
15   ex[expNr].mesh=dvector(1,nPoints);
16   ex[expNr].mesh[1]= ex[expNr].fitstart;
17   ex[expNr].mesh[nPoints]= ex[expNr].fitend;
18 
19   if (globs->noMeasurements==FALSE) 
20     {         
21       // mesh at data points
22       if (ex[expNr].nMeasure < nPoints) 
23         {
24           cerr << "Too few measurements to construct mesh\n";
25           exit(1);
26         }
27       for (i=2; i < nPoints; ++i)
28         ex[expNr].mesh[i]=ex[expNr].xMeasure[ex[expNr].firstMeasure+int(double((i-1)*(ex[expNr].nMeasure-1))/double(nPoints-1))];
29     } 
30   else 
31     {        
32       // evenly spaced mesh
33       for (i=2; i < nPoints; ++i)
34         ex[expNr].mesh[i]=ex[expNr].fitstart+(ex[expNr].fitend-ex[expNr].fitstart)*double(i-1)/double(nPoints-1);
35     }
36 }
\end{verbatim}\normalsize 


