Commit d4723038 authored by Marco Ratto's avatar Marco Ratto
Browse files

1) fixed infinite loop

2) fixed names of sylvester functions
parent 32de0fd6
......@@ -154,7 +154,7 @@ end
SampleSize = options_ident.prior_mc;
if ~(exist('sylvester3mr','file')==2),
if ~(exist('sylvester3','file')==2),
dynareroot = strrep(which('dynare'),'dynare.m','');
addpath([dynareroot 'gensylv'])
......
......@@ -355,10 +355,12 @@ else % generalized sylvester equation
elem(:,:,j) = (Dg0(:,:,j)-Dg1(:,:,j)*A);
d(:,:,j) = Dg2(:,:,j)-elem(:,:,j)*A;
end
xx=sylvester3mr(a,b,c,d);
xx=sylvester3(a,b,c,d);
flag=1;
while flag,
[xx, flag]=sylvester3amr(xx,a,b,c,d);
icount=0;
while flag && icount<4,
[xx, flag]=sylvester3a(xx,a,b,c,d);
icount=icount+1;
end
H=zeros(m*m+m*(m+1)/2,param_nbr+length(indexo));
if nargout>1,
......@@ -439,10 +441,12 @@ if nargout > 5,
d(:,:,jcount) = elem1+elem2;
end
end
xx2=sylvester3mr(a,b,c,d);
xx2=sylvester3(a,b,c,d);
flag=1;
while flag,
[xx2, flag]=sylvester3amr(xx2,a,b,c,d);
icount=0;
while flag && icount<4,
[xx2, flag]=sylvester3a(xx2,a,b,c,d);
icount = icount + 1;
end
jcount = 0;
for j=1:param_nbr,
......
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