COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### nullcline plot - fsolve problem?

• Follow

```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?

Marton
```
 0
Reply Marton 3/30/2010 1:55:19 PM

```under straight line i mean vertical (for 'X' ) within 10^-3 and 8x10 approximately
```
 0
Reply Marton 4/1/2010 6:30:30 PM

```to plot implicit functions of two variables (for example nullclines), you can simply use the command ezplot(fun); where fun is a string or a function handle containing your function.

Regards

Gianfranco
```
 0
Reply 3/15/2011 8:58:11 PM

2 Replies
531 Views

(page loaded in 0.101 seconds)

Similiar Articles:

7/26/2012 8:32:11 AM