Optimization with trapz and data
Afficher commentaires plus anciens
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 commentaires
darova
le 9 Août 2019
Can you the script? Some images?
plasmageek
le 9 Août 2019
darova
le 9 Août 2019
I think fit() will be good
plasmageek
le 12 Août 2019
plasmageek
le 13 Août 2019
Modifié(e) : plasmageek
le 13 Août 2019
plasmageek
le 13 Août 2019
Réponses (0)
Catégories
En savoir plus sur Numerical Integration and Differentiation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!