How to write a summation term within minimization function such as lsqnonlin?

I want to minimize the term function S, to find the values of , that produce the minimal value of S. I will use lsqnonlin function as I will be be curve fitting the data. So, are model coefficients which I want to estimate. I want to know how shall I use the summation term for defining my function given below.
Shall I use a for loop? Or is there anyother method to define the summation for the function.

2 Kommentare

Since you have only 1 non-linear unknown, p, consider using fminspleas instead,
Dbarara
Dbarara am 31 Mär. 2021
Bearbeitet: Dbarara am 31 Mär. 2021
Thanks for sharing this function and I'm considering to apply this to my case. I went through the documentation but, I'm actually unable to understand the formulation of the 'funlist' in the function and how I should be implementing that to my case.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Matt J
Matt J am 23 Mär. 2021
Bearbeitet: Matt J am 23 Mär. 2021
You won't implement the summation. lsqnonlin or lsqcurvefit implements thd sum of squares for you. Your job is to compute a vector of the terms to be squared/summed, and optionally also the vector's Jacobian.

1 Kommentar

Thanks for the reply, I missed out that point in the documentation of the lqsnonlin.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Curve Fitting Toolbox finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 23 Mär. 2021

Bearbeitet:

am 31 Mär. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by