From: Marton Buda on
Hey guys,

I am solving a set of ODE's and am currently having problems with plotting the nullcines. The program i wrote works correctly but within an interval the expected shape of one of the nullcine acts wierd.

It looks as the following:

B=1:2000

for index=1:length(B)

options = optimset( 'TolFun' , 1e-4);

A(index) = fsolve(@(A) f1(A,B(index)),40,options);

end

loglog(A,B,'-');

xlabel('X (Activator concentration)');
ylabel('Y (Repressor concentration)');

hold on

A=0.05:0.05:100

for index=1:length(A)

B(index) = fsolve(@(B) f2(A(index),B),0.001);
end

loglog(A,B,'--');

---------------------nested functions---------------------

function dxdt = f1(A,B)

ea = 1.58;
eb = 0.079;
d = 20;
p = 50;

dxdt = d*(ea*((1+p*(A.*A))./(1+(A.*A)+(B.*B)))-A);

end

function dydt = f2(A,B)

ea = 1.58;
eb = 0.079;
d = 20;
p = 50;

dydt = d*eb*((1+p*(A.*A))./(1+(A.*A))-B;

end

---------------
A screenshot about the plot:

http://jutas.eet.bme.hu/~exi/mathworks/dodgy%20cact2.png

The actual problem is with 'X' where it represents a straight line. Any ideas?

Thanks in advance,

Marton
From: Marton Buda on
under straight line i mean vertical (for 'X' ) within 10^-3 and 8x10 approximately