www.gusucode.com > rtw 工具箱matlab源码程序 > rtw/compute_value_from_rtwoptions.m

    function out = compute_value_from_rtwoptions(hModel)
% COMPUTE_VALUE_FROM_RTWOPTIONS - Real-Time Workshop internal routine.

%   Copyright 1994-2002 The MathWorks, Inc.
  
rtwoptions = get_param (hModel, 'RTWOptions');
tmp = findstr (rtwoptions, 'FileSizeThreshold');
if isempty(tmp)
  tmp = findstr (rtwoptions, 'FunctionSizeThreshold');
  if isempty(tmp)
    % Neither FunctionSizeThreshold nor FileSizeThreshold
    % is in RTWOptions
    out = 1;
  else
    % Only FunctionSizeThreshold is in RTWOptions
    out = 2;
  end
else
  tmp = findstr (rtwoptions, 'FunctionSizeThreshold');
  if isempty(tmp)
    % Only FileSizeThreshold is in RTWOptions    
    out = 3;
  else
    % Both FunctionSizeThreshold and FileSizeThreshold
    % are in RTWOptions    
    out = 4;
  end
end