%GETSIMULINKBLOCKHANDLE Get a Simulink block's handle from its path
%   GETSIMULINKBLOCKHANDLE('OBJ'), where 'OBJ' is a block path name, returns
%   the numeric handle of the specified block, if it exists in a loaded model
%   or library.  Returns -1 if the block cannot be found in a loaded model
%   or library. Library links are resolved where necessary.  Use this
%   to check if a block path is valid and use the numeric handle to 
%   manipulate the block.
%
%   GETSIMULINKBLOCKHANDLE('OBJ',true) attempts to load the model or library
%   containing the specified block path, and then checks if the block exists.
%   No error is thrown if the model or library is not found.  Any models or
%   libraries loaded in this way remain in memory even if no block with the
%   specified path is found.
%
%   Use getSimulinkBlockHandle to check whether a block path is valid. This is
%   more efficient than calling get_param inside a try statement.
%
%   Use the handle returned by getSimulinkBlockHandle in subsequent calls to
%   get_param or set_param, because this is more efficient than making multiple
%   calls to these functions with the full block path.
%
%   Examples:
%
%       % Check whether the model 'f14' is loaded and contains a block
%       % called 'Pilot'.
%       valid_block_path = getSimulinkBlockHandle('f14/Pilot')>0
%
%       % Load model 'f14' if necessary and get the handle of the block
%       % called 'Pilot'. The handle can be used in subsequent calls to
%       % get_param and set_param.
%       handle = getSimulinkBlockHandle('f14/Pilot',true);
%
%   See also GET_PARAM, SET_PARAM, FIND_SYSTEM.

%   Copyright 2014 The MathWorks, Inc.
%   Built-in function.
