Commit 99310d97 authored by Ferhat Mihoubi's avatar Ferhat Mihoubi Committed by Stéphane Adjemian
Browse files

gensylv.m and gensylv.mex work in the same way

parent 1a9b8ff1
function [err, E] = gensylv(fake,A,B,C,D)
function [err, E] = gensylv(kron_prod,A,B,C0,D)
%function [err, E] = gensylv(fake,A,B,C,D)
% Solves a Sylvester equation.
%
% INPUTS
% fake Unused argument (for compatibility with the mex file)
% kron_prod
% A
% B
% C
......@@ -35,8 +35,11 @@ function [err, E] = gensylv(fake,A,B,C,D)
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
C = kron(C,C);
C = C0;
for i=1:(kron_prod-1);
C = kron(C0,C);
end;
C - C0
x0 = sylvester3(A,B,C,D);
E = sylvester3a(x0,A,B,C,D);
err = 0;
\ No newline at end of file
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