Input an integer, switch its base. Input is a string, so is output.
Solution Stats
Problem Comments
5 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers6
Suggested Problems
-
Find the longest sequence of 1's in a binary sequence.
6681 Solvers
-
3819 Solvers
-
Back to basics 8 - Matrix Diagonals
963 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1256 Solvers
-
Calculate the derivative of a polynomial
238 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
CXD, I think the last test will always fail because the function's name has "base" in it.
On top of that, the assert()'s have trailing closing parentheses that will cause syntax errors.
Also, the assert statements need to have an argument of type 'logical', such as assert(a == b) or assert(isequal(a,b)) or assert(strcmp(a,b)). The statement 'assert(a,b)' won't work.
Thank you for your comments - Chris, Christian and William.
The test suite has been update to resolve the issues. This problem can now be attempted.
Thanks, Dyuman!