Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 173600

Submitted on 6 Dec 2012 by Evan

Correct

10Size
Leading solution size is 10.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
peta = 40;
nano_correct = 7.5;
assert(isequal(round(peta_to_nano(peta)*1000)/1000,nano_correct))
ans =
    7.5000
2
Pass
 
%%
peta = 250;
nano_correct = 1.2;
assert(isequal(round(peta_to_nano(peta)*10)/10,nano_correct))
ans =
    1.2000