Fit data to a hill equation using lsqnonlin
20 ビュー (過去 30 日間)
古いコメントを表示
Hi guys,
I'm trying to fit some data to a hill equation. My X-Axis:
Agonist = [0.1 0.5 1 5 10 19 50 100 114 500 1000 2000];
My Y-Axis:
atRA = [0 0 7 15 30 50 58 80 83 87 90 90];
My function:
function [F] = hill_fit(x,Emax,EC50)
num = Emax*x;
denom = EC50+x
F = num./denom
end
My fitting code:
EMax = 90;
EC50 = 19;
x = lsqnonlin(@hill_fit,Agonist,Emax,EC50,atRA);
However this gives me a shed load of warmings so I don't think its doing what I want it to. In essence all I want to do is fit the data to the hill equation, can anybody help?
Thanks
0 件のコメント
採用された回答
Star Strider
2015 年 4 月 11 日
I don’t recognise this particular Hill equation (there are several), but that aside, estimating your parameters and plotting them is relatively straightforward:
Agonist = [0.1 0.5 1 5 10 19 50 100 114 500 1000 2000];
atRA = [0 0 7 15 30 50 58 80 83 87 90 90];
% MAPPING: Emax = b(1), EC50 = b(2)
hill_fit = @(b,x) b(1).*x./(b(2)+x);
b0 = [90; 19]; % Initial Parameter Estimates
B = lsqcurvefit(hill_fit, b0, Agonist, atRA);
AgVct = linspace(min(Agonist), max(Agonist)); % Plot Finer Resolution
figure(1)
plot(Agonist, atRA, 'bp')
hold on
plot(AgVct, hill_fit(B,AgVct), '-r')
hold off
grid
xlabel('Agonist')
ylabel('atRA')
legend('Data', 'Hill Equation Fit', 'Location','SE')
If you’re doing curve-fitting, it’s easiest to use the lsqcurvefit function. It uses lsqnonlin but is specifically designed to make curve-fitting straightforward.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interpolation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!