www.gusucode.com > sloptim工具箱matlab源码程序 > sloptim/sloptim/@sroengine/@Specification/totalCounts.m

    function [SimCount,LinCount] = totalCounts(this)
% TOTALCOUNTS vector method to total up the numer of simulations an linearizations 
% performed on a vector of specifications.

% Copyright 1986-2005 The MathWorks, Inc.

SimCount = 0;
LinCount = 0;

for ct = 1:numel(this)
   newCount = this(ct).getCount;
   switch class(this(ct))
      case 'sroengine.TimeSpec'
         SimCount = SimCount + newCount;
      case 'sroengine.FrequencySpec'
         LinCount = LinCount + newCount;
   end
end