My code is :

function RunlogisticOscilfisher 

omega=1;

N0=1;

k = 10;

A = 1;

p0 = .1;

tspan=(0:0.1:10);

[t,p] = ode45(@logisticOscilnumerical,tspan,p0,[],omega,k,N0);

 figure (1)

plot(t,p)

P = @(T) interp1(t,p,T)

f = @(t) ( ( A.*( ( N0.* (sin(omega.*t)).^2 .*(1-(2.*P(t)./k))+(omega.*cos(omega.*t) ) ).^2 ) ./( (N0).^2.*(sin(omega.*t)).^4.*((P(t)-(P(t).^2./k)).^2 ) ) ) ) ;

I1 = integral( f, 1,2,'ArrayValued',true)./2

I2 = integral( f, 1,4,'ArrayValued',true)./4

I3 = integral( f, 1,6,'ArrayValued',true)./6

I4 = integral( f, 1,8,'ArrayValued',true)./8

I5 = integral( f, 1,10,'ArrayValued',true)./10

I=[I1,I2,I3,I4,I5]

T=[2,4,6,8,10]

figure(2)

plot(T,I./10.^34)

title('The Fisher Information with time')

xlabel('Time')

ylabel('Fisher Information')

1;

% function dpdt = logisticOscilnumerical(t,p,omega,k,N0)

% dpdt = N0*sin(omega*t)*p*(1-p/k);

% end

More Avan Al-Saffar's questions See All
Similar questions and discussions