MATLAB: I keep getting error on the code please help

help

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')

Best Answer

I think you might want this:
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(i)./T))
end
plot(t,N,'-o');
xlabel('t')
ylabel('N')
grid on;