MATLAB: Return only the real nullspace of a complex matrix

nullspacereal numbersrealsrestriction

I need to restrict the computation of the nullspace of a complex matrix A to one over the REAL numbers. How do I do that? null(A,’Real’) did not work.

Best Answer

A = randn(2,5)+1i*randn(2,5);
% N is a real orthonormal basis of null(A)
n = size(A,2);
NR=null([[real(A), imag(A)]; [-imag(A), real(A)]; [zeros(n), eye(n)]]);
N=NR(1:n,:);
% Check
norm(A*N)
Related Question