Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
af23d72c
Commit
af23d72c
authored
Nov 19, 2012
by
Stéphane Adjemian
Browse files
Allow economy-size decomposition with qr2 routine.
parent
9f1ad556
Changes
1
Show whitespace changes
Inline
Side-by-side
matlab/qr2.m
View file @
af23d72c
function
[
Q
,
R
]
=
qr2
(
X
)
function
[
Q
,
R
]
=
qr2
(
varargin
)
% This routine performs a qr decomposition of matrix X such that the
% diagonal scalars of the upper-triangular matrix R are positive. If X
% is a full (column) rank matrix, then R is also the cholesky
...
...
@@ -34,7 +34,7 @@ function [Q,R] = qr2(X)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
[
Q
,
R
]
=
qr
(
X
);
[
Q
,
R
]
=
qr
(
varargin
{:}
);
indx
=
find
(
diag
(
R
)
<
0
);
if
~
isempty
(
indx
)
Q
(:,
indx
)
=
-
Q
(:,
indx
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment