Data fitting with custom model

Hello!
I have a measured data set of xdata and ydata (length N) where I want to determine parameters of a model. The problem is that the model includes the laminate theory of composites where for the given x (for example force) a result for y (for example strain) is calculated. Matlab only uses the full vector of the data set. If I want to get the best parameters (for example e modulus) this results in a parallel computing of N-times the laminate theory that the full vector of measured data can be used. in every help the function between x and y is mathematical like y=ax+b which is quite easy to vectorize.
Do I have to improve the code that this is possible or is there another solution for this ? An idea is to use fmincon and create a function R=(fun(parameter, xdata(1,1))-ydata(1,1))^2 and to minimize R where only one data point is used. But this result in N times the summand "(fun(parameter, xdata(1,1))-ydata(1,1))^2" and depends on the length of the given data set which is quite uncomfortable.
Are there any ideas to solve this ?

回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by