Arrhenius type fit without taking the log(y) and inverse of x
10 次查看(过去 30 天)
显示 更早的评论
Hi all, I have a group of data.
x= 0 7.2 12 16.7 19.4 20.8 21.5
y= 0.02526 0.02604 0.02678 0.02752 0.02822 0.02913 0.02963
And I want to fit the data using a arrhenius type fit with x as the x axis instead of log(x), please tell me how to solve this, thank you.
5 个评论
采纳的回答
Manikanta Aditya
2024-4-6
Hi,
Check this to get answer to your query:
% Define the Arrhenius function
arrhenius = @(A, Ea, R, x) A .* exp(-Ea ./ (R .* x));
% Data
x = [0, 7.2, 12, 16.7, 19.4, 20.8, 21.5];
y = [0.02526, 0.02604, 0.02678, 0.02752, 0.02822, 0.02913, 0.02963];
% Gas constant in J/(mol*K)
R = 8.314;
% Initial guess for A and Ea
A0 = 1;
Ea0 = 1;
% Fit the data
f = fit(x', y', fittype(@(A, Ea, x) arrhenius(A, Ea, R, x)), 'StartPoint', [A0, Ea0]);
% Print the optimal parameters
fprintf('A = %.5f, Ea = %.5f\n', f.A, f.Ea);
Thank you.
6 个评论
Sam Chak
2024-4-6
Is R-square formula unavailable? Also, if you already learn how to fit using the Arrhenius function, what obstacles are you facing with the Arrhenius plus linear function?
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mathematics and Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!