번역 MATLAB Online에서 열기 n(1) = 1; n(2) = 1; k=3 whilek <= 10 n(k) = n(k-1)+n(k-2); k=k+1; end 댓글 수: 3 이전 댓글 1개 표시 John D'Errico2018년 11월 4일 @Ata - What have you tried
Fibonacci sequence, slightly different.I don't see what this has to do with Fibonacci though ;-). But you don't need the loop, just do something like It
So, I have to recursively generate the entire fibonacci sequence, and while I can get individual terms recursively, I'm unable to generate the sequence. I already made an iterative solution to the problem, but I'm curious about a recursive one. Also, fib(0) should give me 0(so fib(5)...
integers, sequences, and formulas derived from the Fibonacci sequence are only the product of a mathematical process. That does not make Fibonacci trading inherently unreliable. However, it can be uncomfortable for traders who want to understand the rationale ...
Answers (3) Image Analyst on 17 Mar 2014 Vote 0 Link Most likely John D'Errico has the best way for doing this. Look at his File Exchange submission and see how he does it. http://www.mathworks.com/matlabcentral/fileexchange/34766-the-fibonacci-sequence 0 Comments Sign in to ...
http://www.mathworks.com/matlabcentral/fileexchange/34766-the-fibonacci-sequence