function expand_to_base( obj )
% expand the non-empty variables to base workspace

cinfo = metaclass(obj);
plist = cinfo.PropertyList;
for i=1:length(plist)
    pthis = plist(i);
    if strcmp(pthis.Name(1:2),'m_')
        var = obj.(pthis.Name);
        if ~isempty(var)
            assignin('base',pthis.Name(3:end),obj.(pthis.Name));
        end
    end
end

end

