about searching a best parameter in Gaussian expansion

5 views (last 30 days)
Hi all, Hopefully it is a right place to post my question. I am going to expand a number in a base of Gaussian to satisfy the following
a/b1 + [exp(1/c)+a]/b2 + ... + [exp(N^2/c)+a]/bN = k
where a, b1, b2 .. bN, k are all constant. N is finite ranged from 3 to 9000. I need to figure out the constant variable c so above expression fitted. What I tried is to put c in a loop ranged from eps to 1000000 with step of 0.01, plug c to above expression and find the smallest difference between the left and right side. It is not a good way but it works for the case when N is small. However, it is almost not possible to work it out when N is large. Also, it is not guarantee 1000000 is large enough to cover the solve. I am looking for a better approach. Thanks.
  2 Comments
Geoff Hayes
Geoff Hayes on 2 Feb 2017
kg - you have posted the same question three times (in the last fifteen minutes) with the only difference being the title. Please just post once.
John D'Errico
John D'Errico on 2 Feb 2017
Edited: John D'Errico on 2 Feb 2017
You need to spend some time in formulating this in terms of what you need to do, because that is not at all clear from your explanation. It may well be solvable using simple tools like fzero or fminbnd, designed to solve 1 variable optimization problems. Why did you not try one of those tools, rather than a massive loop?

Sign in to comment.

Answers (0)

Categories

Find more on Fit Postprocessing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!