Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions core/id.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
assert(rrqr_iter >= 0,'FLAM:id:invalidRRQRIter', ...
'Maximum number of RRQR iterations must be nonnegative.')

% suppress nearly singular matrix warning
warnStruct = warning('off','MATLAB:nearlySingularMatrix');

% initialize
[m,n] = size(A);
niter = 0;
Expand All @@ -64,6 +67,9 @@
if isempty(A)
sk = []; rd = 1:n;
T = zeros(0,n);

% revert nearly singular matrix warning to previous state
warning(warnStruct);
return
end

Expand All @@ -82,6 +88,9 @@
if isempty(free)
sk = fixed; rd = [];
T = zeros(nfix,0);

% revert nearly singular matrix warning to previous state
warning(warnStruct);
return;
end

Expand Down Expand Up @@ -245,4 +254,7 @@
sk = [fixed free(sk)];
rd = [free(rd)];
end

% revert nearly singular matrix warning to previous state
warning(warnStruct);
end