I suggest a couple of minor changes :
1) Insert the following two lines after line 50 to get reasonable default values :
if (nargin < 3) winSize = 3; end;
if (nargin < 2) ord = 'med'; end;
2) Replace M = feature('memstats'); (which only works on Windows) with
try
M = feature('memstats');
catch e
M = 10^28; % or however many bytes of free space you figure your machine will have
end;
Comment only
15 Apr 2011
ordfilt3
Performs 3D order-statistic filtering on 3D volumetric data.
Comment only