Why the graph is not look like logistic graph?
Mostrar comentarios más antiguos
Hi, I have a problem in plotting logistic model graph. May I know what is the problem of my coding and how to solve it? I would be grateful that the answer that provided. Thanks!
Here is the source code:
%% Initialize Input
K = 100000000; % Carrying Capacity of Brain Tumor
C0 = 40000; % Initial Brain Tumor Population Size
r = 4.31*(10^-3); % Growth Rate of Brain Tumor Cells
%% Model Data
t = 730; % Time in Days
C = zeros(t,1) ;
C(1) = C0;
lastArray = {};
% Calculating Brain Tumor Population
for i=1:1:t-1
C(i+1) = (K*(C0*exp(r*i)))/(K-C0+C0*exp(r*i));
end
c=cumsum(C);
hold on
nvec = 1:1:t;
%% Graph Plotting
figure(1)
title( 'Brain Tumor Population Against Time' )
xlabel('Time (Days)')
ylabel('Brain Tumor Population (cells)')
plot(nvec,cumsum(C),'--bo','LineWidth',0.5,'MarkerSize',5,'MarkerEdgeColor','black')
grid
hold on
Here is the output:

Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Language Support en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


