% Measures the  minimum execution time of numerical non-redundant Taylor 
% expansion of filters + loudspeaker A

%   CBVK Toolbox
%   JHMG, PMSB 2016


clear

P=5;        % Expansion order
rep=10;     % Number of repetitions for greater precision of execution
            % time measurement

arq='mtaylor_num_nr_AfiltA_P5';  % Ouput file

% --------------------------------------------------------------------

% Numerical model
[f,g,h,x]=dloudAfiltA_num;      % Regenerate model to be sure

% Pre-calculated weights and indices (cbvkutil/mkwtaylor.m)
load wtaylor_m11_P5

x0=zeros(1,length(f));

dt=zeros(1,rep);
for r=1:rep
tic
F1 = multaylor(f,x,x0,P,wtylr,I);
G1 = multaylor(g,x,x0,P-1,wtylr,I);
dt(r)=toc;
fprintf('%g\n ', dt(r));
end

min(dt)

%save(arq,'dt')



