Iterative code sequence error
Mostrar comentarios más antiguos
f(i) = f(i-3)*f(i-1) - f(i-2) using f(1) = 1, f(2) = 1 and f(3) = 1.
function f = iterativeSequence(n)
f(1) = 1;
f(2) = 1;
f(3) = 1;
for i = 4:n
f(n) = (f(i-3)*f(i-1))-f(i-2);
end
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Mathematics and Optimization 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!