Decimate the supplied imat_fn.
g=decimate(f,100)
g=decimate(f,FACTOR)
g=decimate(f,FACTOR,METHOD,ARGS)
DECIMATE will reduce the number of points in the function F by a factor of FACTOR. F must have evenly-spaced Abscissa values. FACTOR must be a positive integer. If F is a time-domain function, then DECIMATE from the Signal Processing Toolbox will be used. For other types of functions, or if the Signal Processing toolbox is not available, a simpler averaging method will be used instead. Please note that the Signal Processing Toolbox DECIMATE function by default uses a Chebyshev Type 1 low-pass filter which could alter your results slightly. In some cases a small DC offset has been observed. Please check your decimated function against the original, and if unacceptable differences are observed, direct it to use a different filter type.
To force a specific method, set the METHOD parameter to 'mean' or 'spt'. 'mean' will do an average of the data in each segment, and 'spt' will attempt to use the Signal Processing Toolbox decimate function if it's available. Please note that the 'mean' option does not apply a low-pass filter to the data, which means that your data may end up aliased. Allowing DECIMATE to use the Signal Processing DECIMATE function, or low-pass filtering your data prior to calling DECIMATE, is much more robust.
ARGS are additional arguments that you can pass to the Signal Processing DECIMATE function (for example to change the filter order and/or type). Please see the help for DECIMATE for a description of these additional arguments.
>> g=decimate(f,2);
>> g=decimate(f,4,'mean');
>> g=decimate(f,4,'spt');
>> g=decimate(f,4,10); % 10 is passed to Signal Processing DECIMATE
>>