  function Jan25()
% Benchmark some basic operations
clc

% Compare execution times of norm(A,1) and norm(A)
nRepeat = 200;
disp('T1 = average norm(A,1) execution time')
disp('T2 = average norm(A)   execution time')
disp(' ')
disp('   n        T2/T1')
disp('------------------')
for n=100:100:1000
    A = randn(n,n);
    tic
    for i=1:nRepeat
        alfa = norm(A,1);
    end
    t1 = toc;
    tic
    for i=1:nRepeat
        alfa = norm(A);
    end
    t2 = toc;
    fprintf('%5d      %6.2f\n',n,t2/t1)
end

fprintf('\n\n\n')
disp('T1 = (full A)-times-vector      execution time')
disp('T2 = (triangular A-times-vector execution time')
disp(' ')
disp('   n        T2/T1')
disp('------------------')
for n=100:100:1000
    A = randn(n,n);
    x = randn(n,1);
    tic
    for i=1:nRepeat
        y = A*x;
    end
    t1 = toc;
    A = triu(A);
    tic
    for i=1:nRepeat
        y = A*x;
    end
    t2 = toc;
    fprintf('%5d      %6.2f\n',n,t2/t1)
end

nRepeat = 100;
fprintf('\n\n\n')
disp('T1 = A\b, A full       execution time')
disp('T2 = A\b, A triangular execution time')
disp(' ')
disp('   n        T2/T1')
disp('------------------')
for n=100:100:1000
    A = randn(n,n);
    x = randn(n,1);
    tic
    for i=1:nRepeat
        y = A\x;
    end
    t1 = toc;
    A = triu(A);
    tic
    for i=1:nRepeat
        y = A\x;
    end
    t2 = toc;
    fprintf('%5d      %6.2f\n',n,t1/t2)
end

%%%%%%%%  OUTPUT  %%%%%%%%%%%%%%%%
%  T1 = average norm(A,1) execution time
%  T2 = average norm(A)   execution time
 
%     n        T2/T1
%  ------------------
%    100      186.35
%    200      385.34
%    300      412.69
%    400      350.37
%    500      479.36
%    600      488.62
%    700      791.40
%    800      929.49
%    900      582.91
%   1000      577.18



%  T1 = (full A)-times-vector      execution time
%  T2 = (triangular A-times-vector execution time
 
%     n        T2/T1
%  ------------------
%    100        1.10
%    200        0.98
%    300        1.00
%    400        0.92
%    500        0.99
%    600        0.99
%    700        0.99
%    800        0.81
%    900        1.18
%   1000        0.99



%  T1 = A\b, A full       execution time
%  T2 = A\b, A triangular execution time
 
%     n        T2/T1
%  ------------------
%    100       23.02
%    200       27.04
%    300       24.31
%    400       45.68
%    500       47.50
%    600       48.37
%    700       52.23
%    800       57.64
%    900       61.50
%   1000       59.49