%Simulink.FindOptions Create a FindOptions object.
%   F = Simulink.FindOptions creates a default FindOptions object with
%   option parameters set to the default values.
%
%   F = Simulink.FindOptions('PARAM1',VALUE1,'PARAM2',VALUE2,...) creates a
%   FindOptions object with the named parameters set to the specified
%   values. The following table describes the available constraint/value
%   pairs:
%
%     SearchDepth    DEPTH             An integer that constrains the search to
%                                      a specific depth.
%
%     FollowLinks    [true | {false}]  Specify whether to follow library links.
%
%     LookUnderMasks                   Constrains the search from looking into
%                                      different types of masked blocks.
%                    'none'            : No masked blocks
%                    'graphical'       : Masks with no workspace and
%                                        no dialog
%                    'functional'      : Masks with no dialog 
%                    {'all'}           : All masked blocks 
%
%     MatchFilter                      Select model blocks using @fcn, a function handle, which is
%                                      invoked by Simulink.findBlocks and Simulink.findBlocksOfType.
%                                      These function traverse the Simulink block diagram starting at 
%                                      SYSTEM. Using @fcn you can process each block that is seen during
%                                      the traversal. @fcn should return match set to true if the 
%                                      block is to be returned by find_system. @fcn should set 
%                                      prune to false if that branch (subsystem) of the tree should 
%                                      be trimmed from the search.
%
%                    [match, prune] = fcn(element)
%                    where
%                       element - Handle of the block being processed.
%                       match   - Logical. If false, do not return the element in the answer.
%                       prune   - Optional logical (default false). If true, skip search of the 
%                                 current block, which only applies to subsystems.
%
%                    Example: to find all Gain blocks with gain value in between 5 to 10 use:
%                       function [match] = gainFiveToTen(el)
%                           match = false;
%                           if strcmp(get_param(el,'Type'),'block') ...
%                               && strcmp(get_param(el,'BlockType'),'Gain')
%                               gainValue = str2double(get_param(el, 'Gain'));
%                               match = gainValue >= 5 && gainValue <= 10;
%                           end
%                       end
% 
%                       >> F = Simulink.FindOptions('MatchFilter',@gainFiveToTen);
%                       >> Simulink.findBlocks(SYSTEM, F); or
%                       >> Simulink.findBlocksOfType(SYSTEM, F);
%
%     Variants
%          Simulink provides the following post-compile match filters for variant block processing:
% 
%          @Simulink.match.activeVariants      : match blocks which are active in simulation.
%          @Simulink.match.codeCompileVariants : match blocks which are part of generated code.
%
%        Example: 
%           to find blocks which are active in simulation, use
%           >> set_param(SYSTEM, 'SimulationCommand', 'update');
%           >> F = Simulink.FindOptions('MatchFilter', @Simulink.match.activeVariants);
%           >> Simulink.findBlocks(SYSTEM, F);
%
%           to find blocks which will be part of generated code, use
%           >> MODEL([],[],[],'compileForCodegen')
%           >> F = Simulink.FindOptions('MatchFilter', @Simulink.match.codeCompileVariants);
%           >> Simulink.findBlocks(SYSTEM, F);
%           >> MODEL([],[],[],'term')
%
%     Variants                         Constrains the search from looking into
%                                      Variant Subsystems
%                    'ActiveVariants'         : Search in only the active choices
%                    {'AllVariants'}          : Search in all variant choices
%                    'ActivePlusCodeVariants' : Search all choices of variant subsystems
%                                               with 'Generate preprocessor conditionals'
%                                               active. Otherwise, search in only the 
%                                               active variants choices
%        The 'Variants' constraint applies only to Variant Subsystems that have the
%        VariantControlMode set to 'expression' or 'label'. Use the 
%        Simulink.FindOptions object with the MatchFilter option to operate on all 
%        types of variant blocks.
%
%     IncludeCommented [{true} | false]  Specify whether to include commented blocks
%                                        in the search.
%
%     CaseSensitive    [{true} | false]  Specify whether to consider case
%                                        when matching search strings.
%
%     RegExp           [true | {false}]  Specify whether to treat the search 
%                                        string as a regular expression.
%
%   See also FINDBLOCKS, FINDBLOCKSOFTYPE

 
%   Copyright 2017-2020 The MathWorks, Inc.

