Path: news.mathworks.com!not-for-mail
From: "Mohammad Monfared" <gohardoust@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: data fitting for 2 data sets and functions
Date: Fri, 5 Mar 2010 20:44:23 +0000 (UTC)
Organization: gol
Lines: 16
Message-ID: <hmrqf7$9vp$1@fred.mathworks.com>
References: <hlpdj2$6nv$1@fred.mathworks.com> <hlpqhf$d1b$1@fred.mathworks.com> <hls569$nkb$1@fred.mathworks.com> <hls744$gd7$1@fred.mathworks.com>
Reply-To: "Mohammad Monfared" <gohardoust@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1267821863 10233 172.30.248.37 (5 Mar 2010 20:44:23 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 5 Mar 2010 20:44:23 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 93829
Xref: news.mathworks.com comp.soft-sys.matlab:614318

You are right, the function to be minimized would be:

   norm(F1(X1) - Y1)^2 + norm(F2(X2) - Y2)^2

and yes my parameters are constrained then I should use 'fmincon' . In addition to my previous attempt,  now I've provided my function with the gradient, but still no acceptable answer.

"Sadik " <sadik.hava@gmail.com> wrote in message <hls744$gd7$1@fred.mathworks.com>...
> From the documentation, it seems that lsqcurvefit is minimizing the sum of squared errors.
> 
> Actually, if I were you, I would check two things:
> 
> 1. Did I program the optimization correctly?
> 2. Why do you use fmincon? You don't have any constraints, right? So maybe you should use fminunc.
> 
> Best.
>