function simulink(varargin)
% simulink - Open Simulink Start Page
%
% The behavior of the simulink function changed in R2016a. Formerly it
% opened the Simulink Library Browser and loaded the Simulink block
% library. If you wish to preserve that behavior, use slLibraryBrowser
% instead to open the Library Browser, or "load_system simulink" to load
% the Simulink block library.
%
% If you want to start Simulink without opening the Library Browser or
% Start Page, use the faster start_simulink instead.
%
% See also start_simulink, slLibraryBrowser 

% Copyright 2015 The MathWorks, Inc.

narginchk(0,4);

if nargin==1
    cmd = varargin{1};
    switch cmd
        case {'open','close','noshow'}
            % Backward-compatible options.
            slLibraryBrowser(cmd);
            return;
    end
elseif nargin==4 && isempty(varargin{1}) && isempty(varargin{2}) && ...
        isempty(varargin{3}) && ischar(varargin{4})
    % This is the special case where someone is trying to use the model
    % API for the simulink block diagram, but has ended up in this function
    % because of the special path-precedence rules.  Since the "simulink"
    % block diagram is a library the only operation that can have any
    % effect is "load".
    if strcmp(varargin{4},'load')
        load_system('simulink');
        return;
    end
end

sltemplate.ui.StartPage.show

end