[Ifit-users] iFit bug :)
Emmanuel FARHI
farhi at ill.fr
Mon Feb 4 18:15:45 CET 2013
Hello Sandor,
you indded found a bug when plotting final fit results from the 'output'
of 'fits'.
To solve it, add after line 39 of Libraries/Optimizers/fminplot.m, before
the 'else' keyword,
[dummy, best] = sort(fvalHistory); % sort in ascending order
best= best(1);
this should solve the problem.
An other way to plot the same thing is to use:
>> plot(a, output.modelValue)
Thanks for using iFit and reporting issues.
Emmanuel.
On Mon, February 4, 2013 14:35, Sandor Toth wrote:
> Dear Sir/Madamme,
>
> I get an error message after the following code:
>
> a=load(iData, [ ifitpath 'Data/sv1850.scn' ]);
> options=fminimfil('defaults');
> options.OutputFcn='fminplot';
>
> [p,criteria,message,output]= fits(a, gauss, [], options);
>
> fminplot(output);
>
>
> The error message:
>
> Undefined function or variable "best".
>
> Error in fminplot (line 126)
> g=plot(iterHistory, fvalHistory,'b-',
>
>
> version(iData)
> iFit/iData version 1.3 (Nov. 29, 2012) by E.Farhi, P. Willendrup and
> Y.Debab, (c) ILL/DS/CS <farhi at ill.eu> EUPL.
> Matlab version
> 8.0.0.783 (R2012b)
>
> Best regards,
>
> Sandor Toth
>
>
>
> Dr. Sándor Tóth
>
> Laboratory for Neutron Scattering (LNS)
> Paul Scherrer Institute
> WHGA 150
> CH-5232 Villigen PSI
> Switzerland
>
> phone: +41 56 310 31 23
> fax: +41 56 310 29 39
>
> email: sandor.toth at psi.ch
> web: http://www.psi.ch/lns/sandor-toth
>
>
--
FARHI Emmanuel <farhi at ill.fr>
Groupe DS/CS, ILL4/156, Tel 04 76 20 71 35
ILL, Grenoble
More information about the ifit-users
mailing list