Function fitting given samples and two varying paramters

Suppose I've a set of samples for a function f, I've to find the w_i and deltas of this formulation:
(this is the function to minimize)
while the x are known and K is known aswell.
Any hint/pointer to MATLAB tools to do it/ easy way to do it?

6 件のコメント

Image Analyst
Image Analyst 2014 年 6 月 28 日
What do you mean by "find"? If all you know are K, x, and f(x) then how can you find anything, other than the summation, difference, product and integral? Basically you just plug in what you know. How can you find delta(i) or w(i) when you've not set the equation equal to anything or said if you want to minimize it or maximize it or anything???
J.L. Jones
J.L. Jones 2014 年 6 月 28 日
編集済み: J.L. Jones 2014 年 6 月 28 日
Yes very sorry actually last I didn't finished the question (I made a mistake and erroneously deleted the whole phrase). I need the w_i and deltas that minimize the energy I posted
Image Analyst
Image Analyst 2014 年 6 月 28 日
I thought you had f(x). If you don't, wouldn't it just be the sum? Then f(x) - the sum equals zero.
J.L. Jones
J.L. Jones 2014 年 6 月 28 日
編集済み: J.L. Jones 2014 年 6 月 28 日
I do have f(x), the cited "function" is the expression. Sorry for being not clear. I need the deltas and w.
Sorry I was wrong in previous comment. I'm using different notation in another document and I have a similar problem when I indeed need the f. Please ignore previous comment. Sorry about that.
Star Strider
Star Strider 2014 年 6 月 28 日
I don’t understand the summation. Are there simply K (x,f(x)) pairs? If you have data as a function of x, then you can easily create an anonymous function for the argument of the summation and use any number of available curve-fitting functions to estimate the parameters (here, w and δ).
Image Analyst
Image Analyst 2014 年 6 月 29 日
Can you explain the " use case"? I understand the part in between the parentheses - basically you want to fit some signal to a combination of K Gaussians, whose parameters are to be determined. But why are you multiplying that by x and integrating? What's the effect of that?

サインインしてコメントする。

 採用された回答

Roger Stafford
Roger Stafford 2014 年 6 月 29 日

1 投票

This appears to be a standard problem for 'fminsearch' or 'fminunc'. The only special feature is that the objective function to be minimized requires both a summation over K terms (I assume) to obtain the integrand function and integration over (I presume) an infinite range. The objective function computation might make the process rather slow.

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by