Skip to content. | Skip to navigation

Personal tools
    di Bernardo Lab - Systems and Synthetic Biology Lab
    You are here: Home Internal Site DRY LAB MATLAB STUFF How to draw nullclines by Filippo and Gianfranco

    How to draw nullclines by Filippo and Gianfranco

    % plotting nullclines in Matlab, an example

    % starting from the model given by:

    %x'=V1*(ALPHA1+(1-ALPHA1)* ( ( (THETA^H2/(THETA^H2+D^H2 ) ) *y )^H1 /(K1^H1 +( (THETA^H2/(THETA^H2+D^H2 ) ) *y )^H1) ) ) - D1 *x;

    %y'=V2*x-D2*y;

    % parameters are:

    k=[ 4.8076,0.000011, 0.0754, 0.0271, 0.010, 0.0100, 0.0032, 3.163, 1.0, 0.0012, 1.8381, 0.060];

    K1= k(1);

    ALPHA1= k(2);

    V1= k(3);

    V2= k(4);

    D1= k(5);

    D = 0;

    D2= k(6);

    D3= k(7);

    H1= k(8);

    THETA= k(9);

    KF= k(10);

    H2=k(12);

    % nullclines definition (as string):

    str1='V1*(ALPHA1+(1-ALPHA1)* (THETA^H2/(THETA^H2+D^H2[+] *y)^H1 /(K1^H1 + THETA^H2/(THETA^H2+D^H2[+] *y)^H1)))- D1*x';

    str2='V2*x-D2*y';

    % building function to plot

    syms x y;

    func1=eval(str1);

    func2=eval(str2);

    % nullclines plot

    figure(1)

    h=ezplot(func1,[0,8,0,20]);set(h,'color','red','linewidth',2);grid;hold on

    h=ezplot(func2,[0,8,0,20]);set(h,'color','green','linewidth',2);

    %legend(str1,str2);%% to insert legend

    title('Nullclines');