How to obtain a vector perpendicular to a set of vectors (with Matlab)?
<p>Let suppose I want to build a set of N orthonormal vectors. 
Actually I know N-1 orthonormal vectors and I just want to learn the last one.</p>

<p>I should to solve a linear system, setting to zero each scalar product between the N-1 known vectors and that one to find. But how could I do that with Matlab? </p>

<p>EDIT: note that this problem can be seen as a system of linear equations.
If <em>U</em> is the <em>(N-1xN)</em> matrix whose rows contain the known vectors, then I should solve the equation <em>Ux = 0</em>, with <em>x</em> the vector to find and <em>0</em> the vector of zeros.
To do that I used this simple code:</p>

<pre><code>   x = U\0
</code></pre>

<p>But, in this way, it obviously returns the banal solution <em>0</em>. I need to the non trivial solution, any idea? </p>