How fit experimental data to mathematical equation with 10 parameters??

3 vues (au cours des 30 derniers jours)
Anil Kumar Mekala
Anil Kumar Mekala le 4 Déc 2023
Commenté : Shivansh le 5 Jan 2024
I have experimental data of a polymer for storage, loss modulus and loss factor.
And I have mathematical equations for storage, loss moudlus and loss factor. These equations contains 10 parameters I need to obtain them by curve fitting. How to obtain these parameters (These parameters also have some constrains) ??
  8 commentaires
Anil Kumar Mekala
Anil Kumar Mekala le 26 Déc 2023
I am attaching my code which is not working.
You may find the data and equations within that file,
Thank you,
If you find any leads please let me know ASAP.
Shivansh
Shivansh le 5 Jan 2024
Hi Anil!
I understand that you are trying to obtain the ten parameters involved in your model of equations using the curve fitting. The code you have attached is not working as all the three equations are producing “NaN” values on the initial parameters.
You can verify it using the following code after the line where you have initialised the upper bounds by “ub”:
testEquation1 = equation1(initialParams, xData);
testEquation2 = equation2(initialParams, xData);
testEquation3 = equation3(initialParams, xData);
if any(isnan(testEquation1))
error('Equation 1 produces NaN at the initial parameters');
end
if any(isnan(testEquation2))
error('Equation 2 produces NaN at the initial parameters');
end
if any(isnan(testEquation3))
error('Equation 3 produces NaN at the initial parameters');
end
The above results clearly indicate that there is some issue with the handling of equations on initial parameters.
You can use a for loop to find the corresponding x values resulting in NaN values for corresponding equations. You can do the same for the first equation by using the following code snippet:
x_resultingToNaN=[];
for i = 1:779
if isnan(testEquation1(i))
x_resultingToNaN(end+1)= xData(i);
end
end
You are currently taking an array of zeros as initial parameters. You can also try experimenting with it and observe any changes.
Hope it helps!

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by