Re: fit by varying the data
"Patrick Dupre" <[email protected]>
| Newsgroups | gmane.comp.graphics.gnuplot.user |
|---|---|
| Message-ID | <trinity-51c3145a-2df8-4e7c-a69d-220dc40d600a-1560886414036@3c-app-mailcom-bs04> |
Sorry, Why it does not make sense? I need to fit 3 parameters, x0, a and theta by minimizing the sum of the square root: The function depend only on x (and of the parameters, x0 and a) while I have 2 sets of that $2 and $3 (which depend on the same x). I only know a linear combination of this 2 sets that can be fitted y(x) = $2 (x) *sin(theta) + $3 (x) *cos(theta) There is no fundamental glitch. The 2 set of data are issue from the same experiment. Typically, it is vector whose you want to fit the direction. This direction is optimum when one of the components varies linearly. I just need to minimize \sum (y(x) - a*(x-x0))^2 I need to re-read the datasets which are stored in $DATA Any minimization program can potentially do it. =========================================================================== Patrick DUPRÉ | | email: [email protected] Laboratoire interdisciplinaire Carnot de Bourgogne 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE Tel: +33 (0)380395988 =========================================================================== > Sent: Tuesday, June 18, 2019 at 8:45 PM > From: "Hans-Bernhard Bröker" <[email protected]> > To: "Patrick Dupre" <[email protected]>, gnuplot <[email protected]> > Subject: Re: [Gnuplot-info] fit by varying the data > > Am 18.06.2019 um 18:53 schrieb Patrick Dupre: > > Hello, > > > > Can I do this: > > fit a*(x-x0) $DATA u (x=$1):($2*sin(theta)+$3*cos(theta)) via x0,a,theta > ^^^^ > > That assignment operation makes no sense at all. > > And no, you can't do that. The parameters have to influence the > _function_, not the data. You really wouldn't want to re-read the > entire dataset on every iteration of 'fit', just to update the effect of > parameters on the data. > > _______________________________________________ gnuplot-info mailing list [email protected] Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info