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
32de0fd6
Commit
32de0fd6
authored
Apr 04, 2012
by
Marco Ratto
Browse files
fixed typos
parent
f4555573
Changes
2
Hide whitespace changes
Inline
Side-by-side
matlab/gensylv/sylvester3.m
View file @
32de0fd6
function
x
=
sylvester3
mr
(
a
,
b
,
c
,
d
)
function
x
=
sylvester3
(
a
,
b
,
c
,
d
)
% solves a*x+b*x*c=d where d is [n x m x p]
% Copyright (C) 2005-2009 Dynare Team
...
...
@@ -21,6 +21,7 @@ function x=sylvester3mr(a,b,c,d)
n
=
size
(
a
,
1
);
m
=
size
(
c
,
1
);
p
=
size
(
d
,
3
);
x
=
zeros
(
n
,
m
,
p
);
if
n
==
1
for
j
=
1
:
p
,
x
(:,:,
j
)
=
d
(:,:,
j
)
.
/(
a
*
ones
(
1
,
m
)
+
b
*
c
);
...
...
@@ -33,7 +34,6 @@ if m == 1
end
return
;
end
x
=
zeros
(
n
,
m
,
p
);
[
u
,
t
]
=
schur
(
c
);
if
exist
(
'OCTAVE_VERSION'
)
[
aa
,
bb
,
qq
,
zz
]
=
qz
(
full
(
a
),
full
(
b
));
...
...
matlab/gensylv/sylvester3a.m
View file @
32de0fd6
...
...
@@ -32,7 +32,7 @@ for j=1:size(dd,3),
iter
=
iter
+
1
;
end
if
iter
==
500
sprintf
(
'sylvester3a
mr
: Only accuracy of %10.8f is achieved after 500 iterations'
,
e
);
sprintf
(
'sylvester3a : Only accuracy of %10.8f is achieved after 500 iterations'
,
e
);
flag
=
1
;
end
end
\ No newline at end of file
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