Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ingo Thies Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Wrong fit direction / zrange / unreadable graph file Date: Mon, 16 May 2011 16:31:18 +0200 Lines: 32 Message-ID: <93cqpmF1a3U1@mid.individual.net> References: <01ac512a-8031-41f0-a899-0684927f6c32@n10g2000yqf.googlegroups.com> <93c9dhFmvmU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net 0RFa4jYBVJS2XJjCn0ZizQaaKcmgzykyukK9vpUKCvfPsUuzIR Cancel-Lock: sha1:piPkoR9IZcrSrdXsC24hckzqJzw= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.graphics.apps.gnuplot:312 On 16.05.2011 11:52, Christoph Bersch wrote: > To reproduce the problem: > > data.dat: > 1 2.1 > 2 2.9 > 3 4.2 > 4 5.05 > 5 6 > > n = 0 > f(x) = m*x + n > fit f(x) 'data.dat' via m,n Strange. I see no reason for this since n is merely an additional offset which could, depending on the function, even be negative. And the DNLS1E routine from SLATEC doesn't have any problems here. How is fitting done in gnuplot in particular? BTW DNSL1E returns the following best-fit results, even with initial n=m=0.0: m = 0.995 +/- 0.041 n = 1.065 +/- 0.135 as does gnuplot with non-zero initial n. Maybe that routine has some singular matrix trap which gnuplot doesn't have. Ingo