O.k., this works:
classdef unit < hgsetget
% This is just a test class for using SET in an HGSETGET subclass.
properties
System = '';
end
methods
function H = unit(str)
if nargin > 0
H.System = str;
end
end
function varargout = set(H,varargin)
S = struct('System','[{SI} | cgs]');
switch nargin
case 1
if nargout < 1
disp(S)
else
varargout{1} = S;
end
case 2
if nargout < 1
disp(S.System)
else
varargout{1} = S.System;
end
case 3
H.System = varargin{2};
otherwise
error('unit:wrongNumberOfArguments', ...
'Wrong number of arguments to SET command.')
end% switch
end% set
end% methods
end% classdef
But I still wonder - is there an implementation that involves a function SET.SYSTEM?