% SOCFUNCTIONANALYZER Estimate number of operations in a MATLAB function. 
%
% SOCFUNCTIONANALYZER(functionName) - Generates a report with the
% estimated number of operations in the MATLAB function specified by
% functionName. The function generates the report as an Excel(R)
% spreadsheet and a MAT file. It also provides a link to view the report in
% a separate dialog box. The report includes information for each
% mathematical or logical operator in the function, with individual lines
% for each operator and data type.
%
% [report, y1,..,yn] = SOCFUNCTIONANALYZER(functionName) - Returns a
% structure of tables containing the report and the optional output
% arguments of functionName.
%
% SOCFUNCTIONANALYZER(functionName, Name, Value, ...) - Generates a report
% with the estimated number of operations in a MATLAB function specified by
% functionName with additional options specified by one or more Name, Value 
% pairs.
%
% [report, y1,..,yn] = SOCFUNCTIONANALYZER(functionName, Name, Value, ...)
% -  Returns a structure of tables containing the report and the optional
% output arguments of functionName with additional options specified by one
% or more Name, Value pairs.
%
% Name-Value pairs:
%
% 'FunctionInputs' - Cell array of values to use as input arguments to the
%       MATLAB function under estimation. If unspecified, no arguments are
%       passed to the function.      
%       Example: 'FunctionInputs',{10,fi(20)}.
%
% 'IncludeFunction' - Cell array of MATLAB function to be included in the
%       estimation report. Function that are not in the list will be
%       excluded from the report. If unspecified, all functions are
%       included in the report unless an ExcludeFunction list is specified.  
%       Example: 'IncludeFunction',{'myfile.m', 'myfile2.m/myfunc','myfunc2'}
%                                       
% 'ExcludeFunction' - Cell array of MATLAB function to be excluded from
%       the estimation report. If unspecified, all functions are included
%       in the report unless a Function list is specified.
%       Example: 'ExcludeFunction',{'myfile.m', 'myfile2.m/myfunc','myfunc2'}
%   
% 'IncludeOperator' - Cell array of operator to be included in the
%       estimation report. Operators that are not in the list will be
%       excluded from the report. If unspecified, all operators are
%       included in the report unless an ExcludeOperator list is specified.
%       Example: 'IncludeOperator','+'
%                'IncludeOperator',{'+','MUL','GE(>=)'}
%
% 'ExcludeOperator' - Cell array of operator to be excluded from the
%       estimation report. If unspecified, all operators are included in
%       the report unless an Operator list is specified.    
%       Example: 'ExcludeOperator','IF'
%                'ExcludeOperator',{'IF','CALL','ADD(+)'}
%
% 'Folder' - Specify a folder to store the report. If unspecified, the
%       current working directory will be used. Specified folder is
%       automatically created if it does not exist.
%       Example: 'Folder','C:/Work/mydir'
%
% 'Verbose' - Display verbose messages. If unspecified, verbose is false.
%       Example: 'Verbose',true
%
% Example1:
% % Generate a report for the number of operation in soc_test_func
%   
% socFunctionAnalyzer('soc_test_func.m');
%
% Example2:
% % Count the number of addition and multiplication in soc_test_func, and
% % generate report in a folder named report.
%   
% socModelAnalyzer('soc_test_func.slx','IncludeOperator',{'ADD','MUL'},'Folder','report');
% 
% Example3:
% % Generate a report for the number of operation in soc_test_func2.
% % soc_test_func2 takes two numeric input arguments. 
%   
% socFunctionAnalyzer('soc_test_func2.m','FunctionInputs',{10,20});
% 
% See also socModelAnalyzer, socAlgorithmAnalyzerReport.

 
% Copyright 2019 The MathWorks, Inc.

