Hill Equation coding
Show older comments
Hi,
I am having trouble coding for the Hill Equation. I have written the code but when I try to code for equation B, the error message that pops up is: ??? Subscript indices must either be real positive integers or logicals.
Error in ==> practice1 at 13 B = A + Kd(k) * (1+ (sum ((factorial (k)/(factorial (k-i)*factorial (i)))/(prod(Kd*j))))) %part of equation for Q
Here is my code thus far:
sum = 0; %initialize sum Kd = 4; %dissociation constant - input k = 1; %Hill coefficient i = 1; %needed for calculation of sum j = 1; %needed for calculation of prod
for L = (1:5); %for Ligand concentration from 1 to 5 micro-Molar
A = (L).^k / prod(Kd) %part of equation for Q
B = A + Kd(k) * (1+ (sum ((factorial (k)/(factorial (k-i)*factorial (i)))/(prod(Kd*j))))) %part of equation for Q
Q(L) = A/B %A over B equals Bound receptor-ligands over Total Receptors
end %end loop
figure (1) %1st figure plot (Q) %plot Q vs L ... Bound/Total vs Ligand Concentration
-- I understand that I am doing something wrong with the SUM part of the equation, but I don tunderstand how to fix it. Any help will be much appreciated! Thank you!
Answers (1)
Poonam
on 17 Apr 2011
Categories
Find more on Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!