recsConvert Converts the interpolation structure of a model to another form
INTERP1 = recsConvert(INTERP0,MODEL) convert the interpolation structure INTERP0
corresponding to the model defined in the structure MODEL. It returns a new
interpolation structure INTERP1. Without any more arguments this command does not
change the interpolation structure. See below for entering new parameters.
INTERP1 = recsConvert(INTERP0,MODEL,N) changes the number of interpolation
points along each dimension using N as the new number of grid points in each
dimension. If N is a scalar, the same dimension is applied to every dimension.
INTERP1 = recsConvert(INTERP0,MODEL,N,SMIN) changes the minimum values of
the interpolation grid using SMIN as the new minimum. The input N can be
left empty (N=[]) is you want to change only the minimum values.
INTERP1 = recsConvert(INTERP0,MODEL,N,SMIN,SMAX) changes the maximum values
of the interpolation grid using SMAX as the new maximum.
INTERP1 = recsConvert(INTERP0,MODEL,N,SMIN,SMAX,METHOD) changes the
interpolation method, using the string METHOD.
INTERP1 = recsConvert(INTERP0,MODEL,N,SMIN,SMAX,METHOD,OPTIONS) converts the
interpolation structure with the parameters defined by the structure OPTIONS.
Most of the fields of the structure are those used in recsSimul, but it is
also possible to define the following field:
order : for a spline interpolation, it is the order of the spline
(default: 3)
simulmethod : simulation method used to conert decision rules to the new
interpolation structure, 'interpolation' or 'solve' (default)
[INTERP1,S] = recsConvert(INTERP0,MODEL,...) returns the matrix S containing
the new grid of state variables.
[INTERP1,S,X] = recsConvert(INTERP0,MODEL,...) returns the matrix X containing
the value of response variables on the new grid.