Dynamic-Calibration/utils/YALMIP-master/modules/sos/sparsenull.m

7 lines
139 B
Mathematica
Raw Normal View History

2019-12-18 11:25:45 +00:00
function [Z,Q1,R] = sparsenull(A)
[Q,R] = qr(A');
n = max(find(sum(abs(R),2)));
Q1 = Q(:,1:n);
R = R(1:n,:);
Z = Q(:,n+1:end); % New basis