Problem 2405. The Number of Ways
Solution Stats
Problem Comments
Solution Comments
-
2 Comments
It won't work correctly for n greater than 10. :-)
ans-7*(ans>10) would fix that.
You are right, you could use ind2sub to avoid some of the limitations of dec2base as well (e.g. for n>36)...
Problem Recent Solvers19
Suggested Problems
-
Increment a number, given its digits
595 Solvers
-
Determine the number of odd integers in a vector
535 Solvers
-
Moving average (variable kernel length)
110 Solvers
-
Adding Cells with numbers defined as strings
57 Solvers
-
There are 10 types of people in the world
620 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!