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 52425

Submitted on 27 Feb 2012 by S L

Correct

12Size
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
 
%%
x = 1.1;
m = 1.6685185538222564;
assert(abs(1-multiply(x)/m)<1000*eps)

                    
2
Pass
 
%%
x = pi;
m = 11.591953275521519;
assert(abs(1-multiply(x)/m)<1000*eps)

                    
3
Pass
 
%%
x = 1/pi;
m = 1.0510897883672876;
assert(abs(1-multiply(x)/m)<1000*eps)