This solution is outdated. To rescore this solution, sign in.
-
2 Comments
Lavkesh
on 26 Aug 2015
Can anyone suggest how to reduce the size of the code ?
David Browne
on 6 Sep 2016
Yes there are 2 ways. You can initialise f1 as a vector [1, 1]. You also don't need the if else statement if you use start i = 1:n and then use f1(i+2) = ...
Suggested Problems
-
9000 Solvers
-
2348 Solvers
-
1412 Solvers
-
Relative ratio of "1" in binary number
1496 Solvers
-
2027 Solvers
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!