%-----------------------------------------------------------------------
% script bench34
nRepeat = 100;
disp('T3 = MyExp3 benchmark.')
disp('T4 = MyExp4 benchmark.')
disp(' Length(x)     T4/T3')
disp('----------------------------------------------------')
for L = 1000:100:2000
   xL = linspace(-1,1,L);
   tic, for k=1:nRepeat, y = MyExp3(xL); end, T3 = toc;
   tic, for k=1:nRepeat, y = MyExp4(xL); end, T4 = toc;
   disp(sprintf('%6.0f  %13.6f  ',L,T4/T3))
end
disp('----------------------------------------------------')
for L = 1000:100:2000
% T3 = MyExp3 benchmark.
% T4 = MyExp4 benchmark.
%  Length(x)     T4/T3
% ----------------------------------------------------
%   1000       0.022783  
%   1100       0.022148  
%   1200       0.022003  
%   1300       0.021454  
%   1400       0.021335  
%   1500       0.021154  
%   1600       0.020791  
%   1700       0.020608  
%   1800       0.020592  
%   1900       0.020197  
%   2000       0.019923
% ----------------------------------------------------
