diff --git a/matlab/mcp_func.m b/matlab/mcp_func.m index e30ada25d..bece84275 100644 --- a/matlab/mcp_func.m +++ b/matlab/mcp_func.m @@ -1,11 +1,17 @@ function [res,fjac,domer] = mcp_func(x,jacflag) global mcp_data -domer = 0; if jacflag [res,fjac] = mcp_data.func(x,mcp_data.args{:}); + fjac = sparse(fjac); else res = mcp_data.func(x,mcp_data.args{:}); fjac = []; end -disp(norm(res)) \ No newline at end of file +if isreal(res) + domer = 0; +else + domer = 1; +end + +disp(x'*res) diff --git a/matlab/steady_.m b/matlab/steady_.m index df1772a72..dca47e59e 100644 --- a/matlab/steady_.m +++ b/matlab/steady_.m @@ -35,11 +35,12 @@ function [steady_state,params,info] = steady_(M_,options_,oo_) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see . -if options_.solve_algo < 0 || options_.solve_algo > 8 +if options_.solve_algo < 0 || options_.solve_algo > 12 error('STEADY: solve_algo must be between 0 and 8') end -if ~options_.bytecode && ~options_.block && options_.solve_algo > 4 +if ~options_.bytecode && ~options_.block && options_.solve_algo > 4 && ... + options_.solve_algo < 10 error('STEADY: you can''t use solve_algo > 4 without block nor bytecode options') end