Cody

Solution 546021

Submitted on 15 Dec 2014 by Eloy
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
%% Ef = 100; Em = 10; ff = 0.30; [Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff); assert(abs(Ec_l - 13.6986) < 10e-2) assert(abs(Ec_u - 37) < 10e-2) assert(abs(E_diff - 23.3014) < 10e-2) assert(abs(r_l - 1.7010) < 10e-2) assert(abs(r_u - .6298) < 10e-2)

2   Pass
%% Ef = 100; Em = 10; ff = 0.22; [Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff); assert(abs(Ec_l - 12.4688) < 10e-2) assert(abs(Ec_u - 29.8) < 10e-2) assert(abs(E_diff - 17.3312) < 10e-2) assert(abs(r_l - 1.3900) < 10e-2) assert(abs(r_u - 0.5816) < 10e-2)

3   Pass
%% Ef = 100; Em = 10; ff = 0.15; [Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff); assert(abs(Ec_l - 11.5607) < 10e-2) assert(abs(Ec_u - 23.5) < 10e-2) assert(abs(E_diff - 11.9393) < 10e-2) assert(abs(r_l - 1.0327) < 10e-2) assert(abs(r_u - 0.5081) < 10e-2)

4   Pass
%% Ef = 1000; Em = 10; ff = 0.30; [Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff); assert(abs(Ec_l - 14.2248) < 10e-2) assert(abs(Ec_u - 307) < 10e-2) assert(abs(E_diff - 292.7752) < 10e-2) assert(abs(r_l - 20.5821) < 10e-2) assert(abs(r_u - 0.9537) < 10e-2)

5   Pass
%% Ef = 1000; Em = 10; ff = 0.22; [Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff); assert(abs(Ec_l - 12.7845) < 10e-2) assert(abs(Ec_u - 227.8) < 10e-2) assert(abs(E_diff - 215.0155) < 10e-2) assert(abs(r_l - 16.8185) < 10e-2) assert(abs(r_u - 0.9439) < 10e-2)

6   Pass
%% Ef = 1000; Em = 10; ff = 0.15; [Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff); assert(abs(Ec_l - 11.7440) < 10e-2) assert(abs(Ec_u - 158.5) < 10e-2) assert(abs(E_diff - 146.756) < 10e-2) assert(abs(r_l - 12.4963) < 10e-2) assert(abs(r_u - 0.9259) < 10e-2)