From: "Mohammad Monfared" <>
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$>
References: <hlpdj2$6nv$> <hlpqhf$d1b$> <hls569$nkb$> <hls744$gd7$>
Reply-To: "Mohammad Monfared" <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1267821863 10233 (5 Mar 2010 20:44:23 GMT)
NNTP-Posting-Date: Fri, 5 Mar 2010 20:44:23 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 93829
Xref: 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 " <> wrote in message <hls744$gd7$>...
> 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.