Clear Filters
Clear Filters

Simulating FDE's in Matlab

1 view (last 30 days)
KayLynn
KayLynn on 3 Feb 2014
I am trying to simulate the following two finite differential equations in Matlab: N_t+1=N_t+rNt and N_t+N_t[r-)r/K)N_t].
I am given a data setting containing n and t: t=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 n=105 118 139 164 189 214 240 265 290 316 330 348 363 369 373
t=0:1:14; n=[105, 118, 139, 164, 189, 214, 240, 265, 290, 316, 330, 348, 363, 369, 373]; N2= n+r*n; Y=(r-r/ k*n); figure; plot(t, n, 'o-'); xlabel('time'); ylabel('number of cells'); title(' Time Versus Cell Growth') coefficients=polyfit(t,n,2); tfit=0:1:14; yfit = polyval(coefficients,tfit); hold on plot(tfit,yfit,'r','LineWidth',2) legend('Original data','Polynomial Fit', 2)
for i=1 c(i)=(n(i+1)-n(i))/n(i) end r=
I am not sure where to do next if this is even on the correct path. Thanks

Answers (0)

Categories

Find more on Get Started with MATLAB 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!