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
47808a0e
Commit
47808a0e
authored
Jun 08, 2012
by
Houtan Bastani
Browse files
place AIM function calls at top of file
parent
ea273c68
Changes
8
Hide whitespace changes
Inline
Side-by-side
matlab/AIM/SPAmalg.m
View file @
47808a0e
function
[
b
,
rts
,
ia
,
nexact
,
nnumeric
,
lgroots
,
aimcode
]
=
...
SPAmalg
(
h
,
neq
,
nlag
,
nlead
,
condn
,
uprbnd
)
% [b,rts,ia,nexact,nnumeric,lgroots,aimcode] = ...
% SPAmalg(h,neq,nlag,nlead,condn,uprbnd)
%
...
...
@@ -54,8 +56,6 @@
% Journal of Economic Dynamics and Control, 2010, vol. 34, issue 3,
% pages 472-489
function
[
b
,
rts
,
ia
,
nexact
,
nnumeric
,
lgroots
,
aimcode
]
=
...
SPAmalg
(
h
,
neq
,
nlag
,
nlead
,
condn
,
uprbnd
)
b
=
[];
rts
=
[];
ia
=
[];
nexact
=
[];
nnumeric
=
[];
lgroots
=
[];
aimcode
=
[];
if
(
nlag
<
1
||
nlead
<
1
)
error
(
'Aim_eig: model must have at least one lag and one lead'
);
...
...
matlab/AIM/SPBuild_a.m
View file @
47808a0e
function
[
a
,
ia
,
js
]
=
SPBuild_a
(
h
,
qcols
,
neq
)
% [a,ia,js] = SPBuild_a(h,qcols,neq)
%
% Build the companion matrix, deleting inessential lags.
...
...
@@ -27,7 +28,6 @@
% Journal of Economic Dynamics and Control, 2010, vol. 34, issue 3,
% pages 472-489
function
[
a
,
ia
,
js
]
=
SPBuild_a
(
h
,
qcols
,
neq
)
left
=
1
:
qcols
;
right
=
qcols
+
1
:
qcols
+
neq
;
...
...
matlab/AIM/SPCopy_w.m
View file @
47808a0e
function
q
=
SPCopy_w
(
q
,
w
,
js
,
iq
,
qrows
)
% q = SPCopy_w(q,w,js,iq,qrows)
%
% Copy the eigenvectors corresponding to the largest roots into the
...
...
@@ -27,7 +28,6 @@
% Journal of Economic Dynamics and Control, 2010, vol. 34, issue 3,
% pages 472-489
function
q
=
SPCopy_w
(
q
,
w
,
js
,
iq
,
qrows
)
if
(
iq
<
qrows
)
lastrows
=
iq
+
1
:
qrows
;
...
...
matlab/AIM/SPEigensystem.m
View file @
47808a0e
function
[
w
,
rts
,
lgroots
,
flag_trouble
]
=
SPEigensystem
(
a
,
uprbnd
,
rowsLeft
)
% [w,rts,lgroots] = SPEigensystem(a,uprbnd)
%
% Compute the roots and the left eigenvectors of the companion
...
...
@@ -29,7 +30,6 @@
% Journal of Economic Dynamics and Control, 2010, vol. 34, issue 3,
% pages 472-489
function
[
w
,
rts
,
lgroots
,
flag_trouble
]
=
SPEigensystem
(
a
,
uprbnd
,
rowsLeft
)
opts
.
disp
=
0
;
% next block is commented out because eigs() intermitently returns different rts
%try
...
...
matlab/AIM/SPExact_shift.m
View file @
47808a0e
function
[
h
,
q
,
iq
,
nexact
]
=
SPExact_shift
(
h
,
q
,
iq
,
qrows
,
qcols
,
neq
)
% [h,q,iq,nexact] = exact_shift(h,q,iq,qrows,qcols,neq)
%
% Compute the exact shiftrights and store them in q.
...
...
@@ -26,7 +27,6 @@
% Journal of Economic Dynamics and Control, 2010, vol. 34, issue 3,
% pages 472-489
function
[
h
,
q
,
iq
,
nexact
]
=
SPExact_shift
(
h
,
q
,
iq
,
qrows
,
qcols
,
neq
)
%hs=SPSparse(h);
hs
=
sparse
(
h
);
...
...
matlab/AIM/SPNumeric_shift.m
View file @
47808a0e
function
[
h
,
q
,
iq
,
nnumeric
]
=
SPNumeric_shift
(
h
,
q
,
iq
,
qrows
,
qcols
,
neq
,
condn
)
% [h,q,iq,nnumeric] = ...
% SPNumeric_shift(h,q,iq,qrows,qcols,neq,condn)
%
...
...
@@ -27,7 +28,6 @@
% Journal of Economic Dynamics and Control, 2010, vol. 34, issue 3,
% pages 472-489
function
[
h
,
q
,
iq
,
nnumeric
]
=
SPNumeric_shift
(
h
,
q
,
iq
,
qrows
,
qcols
,
neq
,
condn
)
nnumeric
=
0
;
left
=
1
:
qcols
;
...
...
matlab/AIM/SPObstruct.m
View file @
47808a0e
function
scof
=
SPObstruct
(
cof
,
cofb
,
neq
,
nlag
,
nlead
)
% scof = SPObstruct(cof,cofb,neq,nlag,nlead)
%
% Construct the coefficients in the observable structure.
...
...
@@ -38,7 +39,6 @@
% Journal of Economic Dynamics and Control, 2010, vol. 34, issue 3,
% pages 472-489
function
scof
=
SPObstruct
(
cof
,
cofb
,
neq
,
nlag
,
nlead
)
% Append the negative identity to cofb
...
...
matlab/AIM/SPReduced_form.m
View file @
47808a0e
function
[
nonsing
,
b
]
=
SPReduced_form
(
q
,
qrows
,
qcols
,
bcols
,
neq
,
condn
);
% [nonsing,b] = SPReduced_form(q,qrows,qcols,bcols,neq,b,condn);
%
% Compute reduced-form coefficient matrix, b.
...
...
@@ -26,7 +27,6 @@
% Journal of Economic Dynamics and Control, 2010, vol. 34, issue 3,
% pages 472-489
function
[
nonsing
,
b
]
=
SPReduced_form
(
q
,
qrows
,
qcols
,
bcols
,
neq
,
condn
);
b
=
[];
%qs=SPSparse(q);
qs
=
sparse
(
q
);
...
...
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