Main Content

Set Output Port Properties

The Source.m reference System object™ contains a common default implementation of the methods that define the block's output port properties.

methods (Access=protected)
    %% Define output properties
    ...
        
    function num = getNumOutputsImpl(~)
        num = 1;
    end
                
    function varargout = isOutputFixedSizeImpl(~,~)
        varargout{1} = true;
    end
                
    function varargout = isOutputComplexImpl(~)
        varargout{1} = false;
    end
        
    function varargout = getOutputSizeImpl(~)
        varargout{1} = [1,1];
    end
        
    function varargout = getOutputDataTypeImpl(~)
        varargout{1} = 'double';
    end
        
    ...
end

For the DigitalRead System object, the default values do not require modification.

In the next section, you will Test System Object.

See Also

| |