Test  Status  Code Input and Output 

1  Pass 
% The following properties are measured at room temperature and are tensile
% in a single direction. Some materials, such as metals are generally
% isotropic, whereas others, like composite are highly anisotropic
% (different properties in different directions). Also, property values can
% range depending on the material grade. Finally, thermal or environmental
% changes can alter these properties, sometimes drastically.

2  Pass 
S_y = 250e6; %Pa
S_u = 400e6; %Pa
e_y = 0.00125;
e_u = 0.35;
nu = 0.26;
G = 79.3e9; %Pa
E = 200e9; %Pa
density = 7.85; %g/cm^3
sh_exp = 0.14; %strainhardening exponent
sh_coeff = 0.463; %strainhardening coefficient
StWR_corr = 5.096e7;
assert(abs(stress_strain4(S_u,density)StWR_corr)/StWR_corr<1e2)
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In stress_strain4 (line 2)
In ScoringEngineTestPoint2 (line 12)
In solutionTest (line 5)]

3  Pass 
S_y = 830e6; %Pa
S_u = 900e6; %Pa
e_y = 0.00728;
e_u = 0.14;
nu = 0.342;
G = 44e9; %Pa
E = 114e9; %Pa
density = 4.51; %g/cm^3
sh_exp = 0.04; %strainhardening exponent
sh_coeff = 0.974; %strainhardening coefficient
StWR_corr = 19.96e7;
assert(abs(stress_strain4(S_u,density)StWR_corr)/StWR_corr<1e2)
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In stress_strain4 (line 2)
In ScoringEngineTestPoint3 (line 12)
In solutionTest (line 7)]

4  Pass 
S_y = 1172e6; %Pa
S_u = 1407e6; %Pa
e_y = 0.00563;
e_u = 0.027;
nu = 0.29;
G = 11.6e9; %Pa
E = 208e9; %Pa
density = 8.19; %g/cm^3
sh_exp = 0.075; %strainhardening exponent
sh_coeff = 1.845; %strainhardening coefficient
StWR_corr = 17.18e7;
assert(abs(stress_strain4(S_u,density)StWR_corr)/StWR_corr<1e2)
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In stress_strain4 (line 2)
In ScoringEngineTestPoint4 (line 12)
In solutionTest (line 9)]

5  Pass 
S_y = 241e6; %Pa
S_u = 300e6; %Pa
e_y = 0.0035;
e_u = 0.15;
nu = 0.33;
G = 26e9; %Pa
E = 68.9e9; %Pa
density = 2.7; %g/cm^3
sh_exp = 0.042; %strainhardening exponent
sh_coeff = 0.325; %strainhardening coefficient
StWR_corr = 11.11e7;
assert(abs(stress_strain4(S_u,density)StWR_corr)/StWR_corr<1e2)
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In stress_strain4 (line 2)
In ScoringEngineTestPoint5 (line 12)
In solutionTest (line 11)]

6  Pass 
S_y = 70e6; %Pa
S_u = 220e6; %Pa
e_y = 0.00054;
e_u = 0.48;
nu = 0.34;
G = 48e9; %Pa
E = 130e9; %Pa
density = 8.92; %g/cm^3
sh_exp = 0.44; %strainhardening exponent
sh_coeff = 0.304; %strainhardening coefficient
StWR_corr = 2.466e7;
assert(abs(stress_strain4(S_u,density)StWR_corr)/StWR_corr<1e2)
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In stress_strain4 (line 2)
In ScoringEngineTestPoint6 (line 12)
In solutionTest (line 13)]

7  Pass 
S_y = 317e6; %Pa
S_u = 1130e6; %Pa
e_y = 0.000685;
e_u = 0.24;
nu = 0.3;
G = 178e9; %Pa
E = 463e9; %Pa
density = 21.02; %g/cm^3
sh_exp = 0.353; %strainhardening exponent
sh_coeff = 1.870; %strainhardening coefficient
StWR_corr = 5.376e7;
assert(abs(stress_strain4(S_u,density)StWR_corr)/StWR_corr<1e2)
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In stress_strain4 (line 2)
In ScoringEngineTestPoint7 (line 12)
In solutionTest (line 15)]

8  Pass 
S_y = 82e6; %Pa
S_u = 82e6; %Pa
e_y = 0.0265;
e_u = 0.45;
nu = 0.41;
G = 2.8e9; %Pa
E = 3.1e2; %Pa
density = 1.14; %g/cm^3
StWR_corr = 7.193e7;
assert(abs(stress_strain4(S_u,density)StWR_corr)/StWR_corr<1e2)
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In stress_strain4 (line 2)
In ScoringEngineTestPoint8 (line 10)
In solutionTest (line 17)]

9  Pass 
S_y = 230e6; %Pa
S_u = 230e6; %Pa
e_y = 0.016;
e_u = 0.016;
nu = 0.35;
G = 13.0e9; %Pa
E = 14.5e9; %Pa
density = 1.51; %g/cm^3
StWR_corr = 15.23e7;
assert(abs(stress_strain4(S_u,density)StWR_corr)/StWR_corr<1e2)
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In stress_strain4 (line 2)
In ScoringEngineTestPoint9 (line 10)
In solutionTest (line 19)]

10  Pass 
S_y = 1200e6; %Pa
S_u = 1200e6; %Pa
e_y = 0.001;
e_u = 0.001;
nu = 0.20;
G = 478e9; %Pa
E = 1200e9; %Pa
density = 3.51; %g/cm^3
StWR_corr = 34.19e7;
assert(abs(stress_strain4(S_u,density)StWR_corr)/StWR_corr<1e2)
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In stress_strain4 (line 2)
In ScoringEngineTestPoint10 (line 10)
In solutionTest (line 21)]

11  Pass 
ind = randi(4);
switch ind
case 1
S_u = 400e6; %Pa
density = 7.85; %g/cm^3
StWR_corr = 5.096e7;
case 2
S_u = 230e6; %Pa
density = 1.51; %g/cm^3
StWR_corr = 15.23e7;
case 3
S_u = 1130e6; %Pa
density = 21.02; %g/cm^3
StWR_corr = 5.376e7;
case 4
S_u = 1200e6; %Pa
density = 3.51; %g/cm^3
StWR_corr = 34.19e7;
end
assert(abs(stress_strain4(S_u,density)StWR_corr)/StWR_corr<1e2)
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In stress_strain4 (line 2)
In ScoringEngineTestPoint11 (line 20)
In solutionTest (line 23)]

12  Pass 
ind = randi(4);
switch ind
case 1
S_u = 300e6; %Pa
density = 2.7; %g/cm^3
StWR_corr = 11.11e7;
case 2
S_u = 900e6; %Pa
density = 4.51; %g/cm^3
StWR_corr = 19.96e7;
case 3
S_u = 220e6; %Pa
density = 8.92; %g/cm^3
StWR_corr = 2.466e7;
case 4
S_u = 230e6; %Pa
density = 1.51; %g/cm^3
StWR_corr = 15.23e7;
end
assert(abs(stress_strain4(S_u,density)StWR_corr)/StWR_corr<1e2)
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In stress_strain4 (line 2)
In ScoringEngineTestPoint12 (line 20)
In solutionTest (line 25)]

13  Pass 
ind = randi(4);
switch ind
case 1
S_u = 300e6; %Pa
density = 2.7; %g/cm^3
StWR_corr = 11.11e7;
case 2
S_u = 1200e6; %Pa
density = 3.51; %g/cm^3
StWR_corr = 34.19e7;
case 3
S_u = 82e6; %Pa
density = 1.14; %g/cm^3
StWR_corr = 7.193e7;
case 4
S_u = 900e6; %Pa
density = 4.51; %g/cm^3
StWR_corr = 19.96e7;
end
assert(abs(stress_strain4(S_u,density)StWR_corr)/StWR_corr<1e2)
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In stress_strain4 (line 2)
In ScoringEngineTestPoint13 (line 20)
In solutionTest (line 27)]

Back to basics 22  Rotate a matrix
693 Solvers
Sum the entries of each column of a matrix which satisfy a logical condition.
118 Solvers
Fahrenheit to Celsius converter
266 Solvers
90 Solvers
Area of an equilateral triangle
1813 Solvers