Path: csiph.com!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Gaussian fit - Singular matrix in Invert_RtR Date: Wed, 27 Apr 2016 22:29:27 +0200 Lines: 15 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.dfncis.de X7dxhQz/RmRbleiktWsHPgTuEfyDtQ/pfRZyAFfEZtJbvgv8OQkJlG7jHw Cancel-Lock: sha1:ipUZnXFg4wm7YEoe1KqLuq53w2M= User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 In-Reply-To: Xref: csiph.com comp.graphics.apps.gnuplot:3313 Am 27.04.2016 um 19:38 schrieb Andrew Finlay: > I'm trying to write code to automatically fit binned simulation data Bad idea. 'fit' is not a tool to be used blindly, or automatically. Non-linear least-squares fitting needs guidance and consideration of the condition of the input, or you'll run into numerical instabilities much of the time. So let's see why this particular fit failed. Well, for starters the data is quite clearly not Gaussian at all. It's highly asymmetrical, and the tails are way to wide for compared to the FWHM. Trying to fit a Gaussian to that data is an exercise in futility.