Convert float to base N - MATLAB Cody - MATLAB Central

Problem 42758. Convert float to base N

Difficulty:Rate

The matlab function dec2base converts a positive integer number to a specified base. Extend it so that it works with non integers and negative numbers. For example 10.5 in base16 is 'a.8', and -4 is base2 is '-100'.

The tests are not case-sensitive and check the first 6 digits after the decimal point.

Solution Stats

19.84% Correct | 80.16% Incorrect
Last Solution submitted on Mar 07, 2024

Problem Comments

Solution Comments

Show comments
Primes and Rough Numbers, Basic ideas
What is a rough number? What can they be used...
2
4

Problem Recent Solvers20

Suggested Problems

More from this Author2

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page