Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Weighted fit using lsqnonlin
Date: Tue, 3 Nov 2009 11:16:01 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 9
Message-ID: <hcp3dh$50g$1@fred.mathworks.com>
References: <hcou8h$9tu$1@fred.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257246961 5136 172.30.248.37 (3 Nov 2009 11:16:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 3 Nov 2009 11:16:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:582011


"Ida Haggstrom" <ida_haggstrom@yahoo.se> wrote in message <hcou8h$9tu$1@fred.mathworks.com>...

> will not lsqnonlin minimize the square of (y-yIn)? And to introduce a weighted fit, can you not just change to:
> res = (y - yIn).*weights;
> for a given weight vector? Is this a correct way to do a weighted fit using lsqnonlin? 

Yes.

John