function HW02p1

rng('default')
rng(0)

m = 40;
n = 10;
b = 3;
k = 4;

A  = rand(m,n);
Gc = randn(n,k);
Gr = randn(m,k);
Yc = zeros(m,k);
Yr = zeros(n,k);

for i = 1:ceil(n/b)
  ind       = ((i-1)*b + 1):min(i*b,n);
  A_slice   = A(:,ind);
  Yc        = Yc + A_slice*Gc(ind,:);
  ???????????????????????????????????
end

fprintf(1,'Error in Yc = %12.3e\n',max(max(abs(Yc - A*Gc))))
fprintf(1,'Error in Zr = %12.3e\n',max(max(abs(Yr - A'*Gr))))

return
