I want to calculate a full orthogonal-triangular (QR) decomposition using LAPack. The post How to get the Q from the QR factorization output? proposes to use ?GEQRF first and the get "Q" by using DORGQR/ZUNGQR. Unfortunately, this gives only the first N columns and not a orthogonal matrix Q in the case of M>N (more rows than columns). How do calculate "the rest" of Q to get a fully orthogonal square matrix Q?
I was using LAPAck ?GEQRF and DORGQR/ZUNGQR as stated in How to get the Q from the QR factorization output?.