-
4 Comments
Show
1 older comment
Tran Tran
on 12 Mar 2022
I only generate the even numbers.Its save my solution a lot of time.My solution bases on algolithrim
E(N) = 4 * E(N-1) + E(N-2)
where E(0) = 2 and E(1) = 8
Dyuman Joshi
on 12 Mar 2022
You might wanna try again
Tran Tran
on 12 Mar 2022
Wow thank for advise I dont think x =2 make my loop not work.Your additional test case make me change.
Jose Matos
on 29 Mar 2022
Tran Tran, thanks for the tip. Your formula to to calculate just the even Fibonacci numbers really work. Thanks!
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!