Skip to content
Snippets Groups Projects
Commit 9c9e1036 authored by Johannes Pfeifer's avatar Johannes Pfeifer Committed by Stéphane Adjemian
Browse files

Make csolve compatible with sparse matrices

Required for stack_solve_algo=7
parent dea930d3
No related merge requests found
...@@ -84,7 +84,7 @@ while ~done ...@@ -84,7 +84,7 @@ while ~done
[f0,grad] = feval(gradfun,x,varargin{:}); [f0,grad] = feval(gradfun,x,varargin{:});
end end
if isreal(grad) if isreal(grad)
if rcond(grad)<1e-12 if rcond(full(grad))<1e-12
grad=grad+tvec; grad=grad+tvec;
end end
dx0=-grad\f0; dx0=-grad\f0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment