Problem 47270. Find Logic 11
Solution Stats
Problem Comments
Solution Comments
-
2 Comments
Alireza yarmohammadi
on 26 May 2021
please tell me why this code did not work
y(1)=1;
y(2)=2;
for i=3:x
y(i)=y(i-1)+y(i-2);
end
y(x)
because of that i tried another bugy way
Dyuman Joshi
on 26 May 2021
@Alireza, Check my other comment on your incorrect solution.
-
1 Comment
Dyuman Joshi
on 26 May 2021
@Alireza, Your function call is incorrect.
You are calling an array when the problem expects a single value.
Problem Recent Solvers219
Suggested Problems
-
Back to basics 22 - Rotate a matrix
866 Solvers
-
729 Solvers
-
513 Solvers
-
343 Solvers
-
628 Solvers
More from this Author40
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!