How to generate orthogonal matrix in Octave?

8k Views Asked by At

How to generate an orthogonal matrix in Octave?

I saw something like that

gallery('orthog',n,k)

in matlab, but I can't find any similar function in Octave.

Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER
  1. You can apply QR to a given random matrix: [q, r] = qr (a). The matrix q will be orthogonal.
  2. You can use orthogonal basis computation: Q = orth(A) on a random matrix A.