Skip to content
Snippets Groups Projects
Commit 3eb7421f authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

sim1.m: use operation that preserves sparsity

(cherry picked from commit bbdcdc89)
parent bba5c6e8
Branches
Tags
1 merge request!2113Add recent bugfixes to 5.x
......@@ -68,8 +68,9 @@ for iter = 1:options.simul.maxit
% A is the stacked Jacobian with period x equations alongs the rows and
% periods times variables (in declaration order) along the columns
if options.debug && iter==1
row=find(all(A==0,2));
column=find(all(A==0,1));
[row,col]=find(A);
row=setdiff(1:periods*ny,row);
column=setdiff(1:periods*ny,col);
if ~isempty(row) || ~isempty(column)
fprintf('The stacked Jacobian is singular. The problem derives from:\n')
if ~isempty(row)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment