Computing terms of a sequence generated by a nonlinear difference equation
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Programming in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!