Index: mttroot/mtt/lib/rep/sfun_rep/Makefile ================================================================== --- mttroot/mtt/lib/rep/sfun_rep/Makefile +++ mttroot/mtt/lib/rep/sfun_rep/Makefile @@ -1,27 +1,27 @@ #! /usr/bin/make -f all: $(SYS)_sfun.mexglx -$(SYS)_sfun.mexglx: $(SYS)_sfun.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_numpar.c $(SYS)_ode.c $(SYS)_odeo.c $(SYS)_state.c $(SYS)_sfun_ae.mexglx $(SYS)_sfun_input.mexglx $(SYS)_sfun_interface.mexglx $(SYS).mdl +$(SYS)_sfun.mexglx: $(SYS)_sfun.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_cr.h $(SYS)_numpar.c $(SYS)_ode.c $(SYS)_odeo.c $(SYS)_state.c $(SYS)_sfun_ae.mexglx $(SYS)_sfun_input.mexglx $(SYS)_sfun_interface.mexglx $(SYS).mdl echo Creating $@ mex $(SYS)_sfun.c cp *_sfun*mexglx $(SYS).mdl .. $(SYS)_sfun.c:: ${MTT_REP}/sfun_rep/sfun.c.tmpl echo Creating $@ cat $^ | sed 's//$(SYS)/g' > $@ -$(SYS)_sfun_ae.mexglx: $(SYS)_sfun_ae.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_ae.c +$(SYS)_sfun_ae.mexglx: $(SYS)_sfun_ae.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_cr.h $(SYS)_ae.c echo Creating $@ mex $(SYS)_sfun_ae.c $(SYS)_sfun_ae.c:: ${MTT_REP}/sfun_rep/mex_ae.c.tmpl echo Creating $@ cat $^ | sed 's//$(SYS)/g' > $@ -$(SYS)_sfun_input.mexglx: $(SYS)_sfun_input.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_input.c $(SYS)_numpar.c +$(SYS)_sfun_input.mexglx: $(SYS)_sfun_input.c sfun_debug.h useful-functions.hh $(SYS)_def.h $(SYS)_sympar.h $(SYS)_cr.h $(SYS)_input.c $(SYS)_numpar.c echo Creating $@ mex $(SYS)_sfun_input.c $(SYS)_sfun_input.c:: ${MTT_REP}/sfun_rep/sfun_input.c.tmpl echo Creating $@ @@ -36,11 +36,11 @@ cat ${MTT_REP}/sfun_rep/sfun_interface.c.tmpl |\ sed 's//$(SYS)/g' |\ ${MTT_REP}/sfun_rep/insert_file.sh > $@ $(SYS)_sfun.zip: $(SYS)_sfun.c sfun_debug.h useful-functions.hh $(SYS)_sfun_ae.c $(SYS)_sfun_input.c $(SYS)_sfun_interface.c \ - $(SYS)_def.h $(SYS)_sympar.h \ + $(SYS)_def.h $(SYS)_sympar.h $(SYS)_cr.h\ $(SYS)_ae.c $(SYS)_input.c $(SYS)_numpar.c $(SYS)_ode.c $(SYS)_odeo.c $(SYS)_state.c \ $(SYS).mdl README echo Creating $@ zip $@ $^ Index: mttroot/mtt/lib/rep/sfun_rep/mex_ae.c.tmpl ================================================================== --- mttroot/mtt/lib/rep/sfun_rep/mex_ae.c.tmpl +++ mttroot/mtt/lib/rep/sfun_rep/mex_ae.c.tmpl @@ -9,10 +9,11 @@ #include #include "sfun_debug.h" #include "useful-functions.hh" #include "_def.h" #include "_sympar.h" +#include "_cr.h" /* utility procedures */ double * array_of_double (size_t n) Index: mttroot/mtt/lib/rep/sfun_rep/sfun.c.tmpl ================================================================== --- mttroot/mtt/lib/rep/sfun_rep/sfun.c.tmpl +++ mttroot/mtt/lib/rep/sfun_rep/sfun.c.tmpl @@ -12,10 +12,11 @@ #include "simstruc.h" #include "sfun_debug.h" #include "useful-functions.hh" #include "_def.h" #include "_sympar.h" +#include "_cr.h" static double *mttdx; /* pointer to rates */ static double *mttu; /* pointer to inputs */ static double *mttpar; /* pointer to parameters */ static double *mttx; /* pointer to states */ @@ -163,11 +164,11 @@ p[i] = mttpar[i]; } mexPutArray (MTT_MATLAB_P, "base"); /* call fsolve */ - mexEvalString ("MTT_Ui = fsolve (@_sfun_ae, MTT_Ui, optimset('display','off'), MTT_X, MTT_U, MTT_T, MTT_P);"); + mexEvalString ("MTT_Ui = fsolve (@_sfun_ae, MTT_Ui, optimset('display','off','diagnostics','off'), MTT_X, MTT_U, MTT_T, MTT_P);"); /* retrieve result */ MTT_MATLAB_Ui = mexGetArray ("MTT_Ui", "base"); p = mxGetPr (MTT_MATLAB_Ui); for (i = 0; i < MTTNYZ; i++) { Index: mttroot/mtt/lib/rep/sfun_rep/sfun_input.c.tmpl ================================================================== --- mttroot/mtt/lib/rep/sfun_rep/sfun_input.c.tmpl +++ mttroot/mtt/lib/rep/sfun_rep/sfun_input.c.tmpl @@ -12,10 +12,11 @@ #include "simstruc.h" #include "sfun_debug.h" #include "useful-functions.hh" #include "_def.h" #include "_sympar.h" +#include "_cr.h" static double *mttu; /* pointer to inputs */ static double *mttpar; /* pointer to parameters */ static double *mttx; /* pointer to states */ static double *mtty; /* pointer to outputs */