No BSD License
-
[P,R,eig]=solve_deterministic...
PURPOSE: finds matrices P,R such that
-
[RR,PP,SS1,SS2,QQ1,QQ2]=state...
PURPOSE: set chosen variables as state variables in a model in the
-
gradient(A,B,C,V,W,P,R,S1,S2,...
PURPOSE: finds first differential of matrices representing solution with
-
gsch_order(U,V,TA,TB,SELECT);
PURPOSE: returns ordered generalized Shur decomposition
-
gschur(A,B,COND);
PURPOSE: returns ordered generalized Schur decomposition of a matrix pair (A,B)
-
gsylvester(A,B,C,D,E,F,versio...
PURPOSE: solves the generalized Sylvester equations:
-
gsylvester_schur(A,B,C,D,E,F)
PURPOSE: solves the generalized Sylvester equation:
-
linear2ss(A,B,C,V,W,xi,do_red...
PURPOSE: solves model of the form
-
lineareq(A,B,method,tol)
-
model_reduction(A,B,method)
PURPOSE: reduces dimension of the problem of finding matrices R, P, such that AR = BRP
-
null2(A,method,tol)
PURPOSE: returns an orthonormal basis of the null space and range of A
-
putv(A,method,tol)
-
rank2(A,tol)
PURPOSE: estimates matrix rank of an triangular matrix
-
schur_ord(A,B,xi)
PURPOSE: performs generalized Schur decomposition, eigenvalues lambda,
-
solve_stochastic(A,B,V,W,R,me...
PURPOSE: solves stochastic part of the mdel
-
state_check(K,R)
PURPOSE: checks whether variables defined by the matrix K can be chosen
-
state_find(K,R)
PURPOSE: finds whether some additional variable can be chosen as state variables
-
contents.m
-
demo.m
-
View all files
from
Solution to Linear Rational Expectations Models
by Pawel Kowal
Solves linear rational expectation models, delivers derivatives of solutions
|
| rank2(A,tol)
|
function n = rank2(A,tol)
% PURPOSE: estimates matrix rank of an triangular matrix
%
% ---------------------------------------------------
% USAGE: n = rank2(A,tol)
% where:
% A a matrix
% tol uses the tolerance tol in estimating
% matrix rank
%
% n an estimate of matrix A rank
%
% COMMENTS:
% This routine gives fast estimation of matrix rank but less accurate
% than Mathlab's rank. This routine is unable to distinguish very small
% singular values from zero.
%
% Copyright (c) Pawel Kowal (2006)
% All rights reserved
% LREM_SOLVE toolbox is available free for noncommercial academic use only.
% pkowal3@sgh.waw.pl
[n,m] = size(A);
if n==0 ||m==0
n = 0;
return;
end
if n==1 || m==1
s = abs(A(1,1));
else
s = abs(diag(A));
end
n = sum(s>tol);
|
|
Contact us at files@mathworks.com