Convert Hard Drive marketing sizes to actual data sizes - MATLAB Cody - MATLAB Central

Problem 303. Convert Hard Drive marketing sizes to actual data sizes

Difficulty:Rate

Hard drive sizes are typically marketed using the decimal meaning of prefixes, whereas RAM uses binary meanings. For example:

A 10 GB hard drive (common only a few years ago) typically has 10,000,000,000 bytes 10 GB of RAM though is equal to 10,737,418,240 bytes

More information about this can be found here.

The problem is to take 2 inputs based upon decimal prefixes (a number representing size and a string representing the units) and output the equivalent size using binary prefixes, as seen below:

[100], 'MB' -> [95.4]
[100], 'GB' -> [93.1]

Solution Stats

27.27% Correct | 72.73% Incorrect
Last Solution submitted on Nov 21, 2024

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8

Problem Recent Solvers68

Suggested Problems

More from this Author39

Community Treasure Hunt

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

Start Hunting!