Problem 2405. The Number of Ways
Solution Stats
Problem Comments
Solution Comments
-
2 Comments
Jan Orwat
on 9 Jul 2014
It won't work correctly for n greater than 10. :-)
ans-7*(ans>10) would fix that.
Alfonso Nieto-Castanon
on 9 Jul 2014
You are right, you could use ind2sub to avoid some of the limitations of dec2base as well (e.g. for n>36)...
Problem Recent Solvers20
Suggested Problems
-
Back to basics 6 - Column Vector
976 Solvers
-
Choose the best fitting dominoes
218 Solvers
-
Construct an index vector from two input vectors in vectorized fashion
265 Solvers
-
The Answer to Life, the Universe, and Everything
435 Solvers
-
Matrix multiplication across rows
238 Solvers
More from this Author21
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!