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 222246

Submitted on 23 Mar 2013 by Alfonso Nieto-Castanon

Correct

25Size
Leading solution size is 15.
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
 
%%
Y = 2e5;
S = 'kN/m^2';
y_correct = 2e8;
assert(isequal(convert_young(Y,S),y_correct))

                    
2
Pass
 
%%
Y = 2e5;
S = 'N/m^2';
y_correct = 2e11;
assert(isequal(convert_young(Y,S),y_correct))

                    
3
Pass
 
%%
Y = 2e5;
S = 'kN/mm^2';
y_correct = 2e2;
assert(isequal(convert_young(Y,S),y_correct))

                    
4
Pass
 
%%
Y = 2e5;
S = 'N/mm^2';
y_correct = 2e5;
assert(isequal(convert_young(Y,S),y_correct))

                    
5
Pass
 
%%
Y = 2e5;
S = 'kN/cm^2';
y_correct = 2e4;
assert(isequal(convert_young(Y,S),y_correct))