Optimization with trapz and data
2 次查看(过去 30 天)
显示 更早的评论
The basic bit. I have an experimental data point. I can estimate what the value should be from physics; the value is dependent on temperature(a constant) and energy(covers a range). I want to find the value of temperature that (chi) minimizes the experimental value to my estimated value to find the temperature.
The complex bit: I have to integrate over energy to get my estimated signal. The integral is non-trivial. It involves a predined function (chosen based on physics). Pretty much this is an exponential with energy and temperature outfront and in the exponent.
This is multipled by two emperical functions that take into account filters and diagnostic response functions that depend on energy. The emperical functions aren't really functions; I have emperical data, did multiple fits to sections of the data to get the best fit possible and compiled it all into an array using the relevant energy values. A single fit is not possible.
Currently I'm solving this with for loops, generating large amounts of data. There are actually 9 data points, which should be solved consistently with each other. It takes 10-20 minutes with a parallel loops to run the current iteration. The issue is, we think there's a second temperature. Running it with loops was already inefficient but I've never used the optimziation toolbox and kept getting stuck trying to use it. A second temperature makes doing this with loops....pretty much impossible.
I'm wondering if there's a way to use the optimization toolbox (or something else in Matlab?) to improve solving this problem.
6 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!