Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How can I non linear fit this equation?

1 Ansicht (letzte 30 Tage)
Pengju
Pengju am 19 Apr. 2016
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Dear all,
I know the equation which is used for fitting already,something like:
y=E-109736.623./[x1.*(x-p1).^2+x2.*(x-p2).^2+x3.*(x-p3).^2]
I have x value, y value, x1, x2, x3 value, respectively, they are corresponding to fit.txt file column1, column2, column3, column4, column5, respectively.
How can I get E, p1, p2, p3 by using this equation?
Thanks

Antworten (1)

Walter Roberson
Walter Roberson am 19 Apr. 2016
The easiest way is the Curvefitting Toolbox
  14 Kommentare
Pengju
Pengju am 22 Apr. 2016
Dear Walter, I am sorry, I still can not figure out the minima.
Best
Walter Roberson
Walter Roberson am 22 Apr. 2016
minidx = min(residues(:));
min_is_near = [gE(minidx), gp1(minidx), gp2(minidx), gp3(minidx)];
The larger the matrix you use originally, the more likely it is that you will find a good minima.
The code that I posted does make copies of these arrays, so you end up with about 6 arrays that are 84 by (19 x 19 x 19 x 19). The copies themselves add up, so when you do not have a lot of memory, you might want to break the grid up into sections to search and find the best of the results. For example, if you used 20 x 20 x 20 x 20 then you could search first on (1:5, :, :, :, :) then on (6:10, :, :, :, :) and so on.

Diese Frage ist geschlossen.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by