I keep getting error on my code please help
Afficher commentaires plus anciens
I keep getting an error can someone help please
function bacteria1 numIterations = 24; t = 0:numIterations; N = zeros(size(t)); N(1) = 1; N0 = 1; T = 1/3; for i=(1:numIterations) N(i+1)= N0.*(2.^(t./T)) end plot(t,N,'-o'); xlabel('t') ylabel('N')
Réponse acceptée
Plus de réponses (1)
madhan ravi
le 25 Oct 2018
function bacteria1
numIterations = 24;
T=1/3
t = 0:numIterations;
N = zeros(size(t));
N(1) = 1;
N0 = 1;
N=N0.*(2.^(t./T))
plot(t,N,'-o');
xlabel('t')
ylabel('N')
end
1 commentaire
madhan ravi
le 25 Oct 2018
Loop is unnecessary
Catégories
En savoir plus sur Error Functions dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
