Commit 47808a0e authored by Houtan Bastani's avatar Houtan Bastani
Browse files

place AIM function calls at top of file

parent ea273c68
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');
......
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;
......
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;
......
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
......
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);
......
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;
......
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
......
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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment