Changeset 12251
- Timestamp:
- 05/16/12 11:03:19 (13 years ago)
- Location:
- issm/trunk-jpl/src/modules/Kriging
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/modules/Kriging/Kriging.cpp
r12219 r12251 13 13 double *y_interp = NULL; 14 14 double *predictions = NULL; 15 double *error = NULL; 15 16 Options *options = NULL; 16 17 int N_interp,M_interp,M,N,n_obs; … … 20 21 21 22 /*checks on arguments on the matlab side: */ 22 if (nrhs<NRHS || nlhs !=NLHS){23 if (nrhs<NRHS || nlhs>NLHS){ 23 24 KrigingUsage(); _error_("Kriging usage error"); 24 25 } … … 33 34 34 35 /*Call x layer*/ 35 Krigingx(&predictions, x,y,observations,n_obs,x_interp,y_interp,M_interp*N_interp,options);36 Krigingx(&predictions,&error,x,y,observations,n_obs,x_interp,y_interp,M_interp*N_interp,options); 36 37 37 38 /*Generate output Matlab Structures*/ 38 WriteData(PREDICTIONS,predictions,M_interp,N_interp); 39 if(nlhs>=1) WriteData(PREDICTIONS,predictions,M_interp,N_interp); 40 if(nlhs==2) WriteData(ERROR,error,M_interp,N_interp); 39 41 40 42 /*Free ressources: */ … … 45 47 xfree((void**)&y_interp); 46 48 xfree((void**)&predictions); 49 xfree((void**)&error); 47 50 48 51 /*end module: */ -
issm/trunk-jpl/src/modules/Kriging/Kriging.h
r12164 r12251 26 26 /* serial output macros: */ 27 27 #define PREDICTIONS (mxArray**)&plhs[0] 28 #define ERROR (mxArray**)&plhs[1] 28 29 29 30 /* serial arg counts: */ 30 31 #undef NLHS 31 #define NLHS 132 #define NLHS 2 32 33 #undef NRHS 33 34 #define NRHS 5
Note:
See TracChangeset
for help on using the changeset viewer.