Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: simple linear fit
Date: Wed, 16 Mar 2011 08:16:04 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 6
Message-ID: <ilprk4$nii$1@ginger.mathworks.com>
References: <ilpl9k$8n2$1@ginger.mathworks.com> <ilpm8s$shj$1@speranza.aioe.org> <ilppep$ica$1@ginger.mathworks.com> <ilppvk$jku$1@ginger.mathworks.com> <ilpqtm$ls8$1@ginger.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: ginger.mathworks.com 1300263364 24146 172.30.248.46 (16 Mar 2011 08:16:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 16 Mar 2011 08:16:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:716143

"Steve Sachay" wrote in message <ilpqtm$ls8$1@ginger.mathworks.com>...
> Thank you very much. Both methods posted give me the same answer of course, but slightly different than my explicit method.  I have to say "by eye" my fit looks the best but they are both very good. 

All three methods are based on least-square criteria, and should give the same result. The discrepancy you have seen is due to not fully converge by fminsearch. If it looks better, it's just pure luck.

Bruno