\section{/home/peifer/diffit/modules/out\-Simit.cc File Reference}
\label{outSimit_8cc}\index{/home/peifer/diffit/modules/outSimit.cc@{/home/peifer/diffit/modules/outSimit.cc}}
{\tt \#include $<$iostream$>$}\par
{\tt \#include $<$math.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$time.h$>$}\par
{\tt \#include \char`\"{}../def.h\char`\"{}}\par
{\tt \#include \char`\"{}../model.h\char`\"{}}\par
{\tt \#include \char`\"{}../nr.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf out\-Simit} ({\bf Glob\-Exp} ex[$\,$], {\bf Glob} $\ast$globs, double $\ast$t, long n, double $\ast$$\ast$y)
\end{CompactItemize}


\subsection{Function Documentation}
\index{outSimit.cc@{out\-Simit.cc}!outSimit@{outSimit}}
\index{outSimit@{outSimit}!outSimit.cc@{out\-Simit.cc}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void out\-Simit ({\bf Glob\-Exp} {\em ex}[$\,$], {\bf Glob} $\ast$ {\em globs}, double $\ast$ {\em t}, long {\em n}, double $\ast$$\ast$ {\em y})}\label{outSimit_8cc_47814cfd9dc34050f085fe35b880db5f}




Definition at line 12 of file out\-Simit.cc.

References Glob\-Exp::nobs, and Glob::sig.

\footnotesize\begin{verbatim}13 {
14   long k,l;
15   long idum=-time(NULL);
16   long nobs=ex[1].nobs;
17   ofstream out;
18   
19   out.open(ex[1].fileName);
20 
21   if(globs->sig==0)
22     {
23       for(k=1;k<=n;k++)
24         {
25           out << t[k];
26           for(l=1;l<=nobs;l++)
27             out << " " << y[k][l] << " 1";
28           out << endl;
29         }
30 
31     }
32   else
33     {
34       double *max=dvector(1,nobs),*min=dvector(1,nobs);
35       for(l=1;l<=nobs;l++)
36         {
37           max[l]=y[1][l];
38           min[l]=y[1][l];
39         }
40       for(k=2;k<=n;k++)
41         {
42           for(l=1;l<=nobs;l++)
43             {
44               if(max[l]<y[k][l])
45                 max[l]=y[k][l];
46               if(min[l]>y[k][l])
47                 min[l]=y[k][l];
48             }
49         }
50       for(k=1;k<=n;k++)
51         {
52           out << t[k] ;
53           for(l=1;l<=nobs;l++)
54             out << " " << y[k][l]+globs->sig*fabs(max[l]-min[l])*gasdev(&idum) << " " << globs->sig*fabs(max[l]-min[l]);
55           out << endl;
56         }
57     }
58 
59 }
\end{verbatim}\normalsize 


