Iterative code sequence error
이전 댓글 표시
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
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!