% HW3 - problem 4
% tests MultAB.m

rand('seed',.12345)
m=[2 4 3];
n=[2 3 4];


for i=1:length(n)

  % generates matrices
  A=rand(m(i),n(i));
  d=rand(n(i),1);
  sub=rand(n(i)-1,1);
  sup=rand(n(i)-1,1);
  B=diag(d) + diag(sup,1) + diag(sub,-1);
  
  C=MultAB(A,sup,d,sub)
  
end

  