How fit experimental data to mathematical equation with 10 parameters??
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Shivansh
am 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!
Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!