diff --git a/atintegrators/VariableThinMPolePass.c b/atintegrators/VariableThinMPolePass.c index 458f61e20..66b91e68c 100644 --- a/atintegrators/VariableThinMPolePass.c +++ b/atintegrators/VariableThinMPolePass.c @@ -9,7 +9,7 @@ #include "atrandom.c" #define TWOPI 6.28318530717959 - +#define C0 2.99792458e8 struct elemab { @@ -105,14 +105,23 @@ void VariableThinMPolePass(double *r, struct elem *Elem, double t0, int turn, in struct elemab *ElemB = Elem->ElemB; double *ramps = Elem->Ramps; - for(i=0;i1) { /* list of optional fields */ plhs[1] = mxCreateCellMatrix(13,1); - mxSetCell(plhs[0],0,mxCreateString("AmplitudeA")); - mxSetCell(plhs[0],1,mxCreateString("AmplitudeB")); - mxSetCell(plhs[0],2,mxCreateString("FrequencyA")); - mxSetCell(plhs[0],3,mxCreateString("FrequencyB")); - mxSetCell(plhs[0],4,mxCreateString("PhaseA")); - mxSetCell(plhs[0],5,mxCreateString("PhaseB")); - mxSetCell(plhs[0],6,mxCreateString("Ramps")); - mxSetCell(plhs[0],7,mxCreateString("Seed")); - mxSetCell(plhs[0],8,mxCreateString("FuncA")); - mxSetCell(plhs[0],9,mxCreateString("FuncB")); - mxSetCell(plhs[0],10,mxCreateString("NSamplesA")); - mxSetCell(plhs[0],11,mxCreateString("NSamplesB")); - mxSetCell(plhs[0],12,mxCreateString("Periodic")); + mxSetCell(plhs[1],0,mxCreateString("AmplitudeA")); + mxSetCell(plhs[1],1,mxCreateString("AmplitudeB")); + mxSetCell(plhs[1],2,mxCreateString("FrequencyA")); + mxSetCell(plhs[1],3,mxCreateString("FrequencyB")); + mxSetCell(plhs[1],4,mxCreateString("PhaseA")); + mxSetCell(plhs[1],5,mxCreateString("PhaseB")); + mxSetCell(plhs[1],6,mxCreateString("Ramps")); + mxSetCell(plhs[1],7,mxCreateString("Seed")); + mxSetCell(plhs[1],8,mxCreateString("FuncA")); + mxSetCell(plhs[1],9,mxCreateString("FuncB")); + mxSetCell(plhs[1],10,mxCreateString("NSamplesA")); + mxSetCell(plhs[1],11,mxCreateString("NSamplesB")); + mxSetCell(plhs[1],12,mxCreateString("Periodic")); } } else {