Reading "Further details" in the source for DTZRZF, I think the explanation there is quite confusing and possibly wrong. I am just trying to understand how to build up Z from the elements of a on exit:
I would start with the column vectors u(k), k=1..m, each of length n, and specify their components as, from top to bottom:
0 of length (k-1), (if length is zero then this is absent)
0 of length (m-k), (if length is zero then this is absent)
z of length(n-m) = a(k,m+1:n) (on exit)
Then , the Z(k) matrices are built up as 1 - tau(k)*u(k)*u(k)'
where ' means transposed.
And Z is built up as Z(1)*Z(2)*...*Z(m)