mr_gstep, mr_hessian: fix Octave compatibility issue

These functions were saving the whole workspace (with a "save" command). This
workspace includes a function handle which Octave does not know how to save.
The quick fix was to remove these "save", since they also harm performance and
are only useful for debugging purposes.
time-shift
Sébastien Villemot 2011-10-21 15:34:32 +02:00
parent 0fbcc7378e
commit 6bdb220e0d
2 changed files with 1 additions and 7 deletions

View File

@ -62,10 +62,7 @@ while i<n
end
xh1=x;
end
save gstep.mat
end
save gstep.mat

View File

@ -6,7 +6,7 @@ function [hessian_mat, gg, htol1, ihh, hh_mat0, hh1] = mr_hessian(init,x,func,hf
%
% adapted from Michel Juillard original rutine hessian.m
%
% func = name of the function: func must give two outputs:
% func = function handle. The function must give two outputs:
% - the log-likelihood AND the single contributions at times t=1,...,T
% of the log-likelihood to compute outer product gradient
% x = parameter values
@ -144,7 +144,6 @@ while i<n
h1(i)=h10;
i=0;
end
save hess.mat
end
h_1=h1;
@ -176,7 +175,6 @@ if hflag==2
xh_1(i)=x(i);
xh_1(j)=x(j);
j=j+1;
save hess.mat
end
i=i+1;
end
@ -235,4 +233,3 @@ if any(isnan(hessian_mat))
end
hh1=h1;
htol1=htol;
save hess.mat