Computing terms of a sequence generated by a nonlinear difference equation
Mostrar comentarios más antiguos
I would like to compute the first 19 terms of a sequence. I find it takes a very long time. Is there something I am missing? Anyway to speed it up?
It takes 78 secs. Using Excel would be instantaneous.
tic
syms alpha
T=19;
X = sym(1:T);
X(1)=0.1;
for i=2:T
X(i)=(1-alpha - X(i-1)).*X(i-1);
end
disp(X)
toc
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programming 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!