Cody

Solution 549905

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

Test Suite

Test Status Code Input and Output
1   Pass
%% Ef = 100; Em = 10; Vf = 30; Vm = 70; b_str = 'lower'; [Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm); assert(abs(Ec - 13.6986) < 1e-4)

ff = 0.3000 Ec_l = 13.6986 Ec_u = 37 Ec = 13.6986

2   Pass
%% Ef = 100; Em = 10; Vf = 11; Vm = 39; b_str = 'L'; [Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm); assert(abs(Ec - 12.4688) < 1e-4)

ff = 0.2200 Ec_l = 12.4688 Ec_u = 29.8000 Ec = 12.4688

3   Pass
%% Ef = 100; Em = 10; Vf = 150; Vm = 850; b_str = 'Lower'; [Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm); assert(abs(Ec - 11.5607) < 1e-4)

ff = 0.1500 Ec_l = 11.5607 Ec_u = 23.5000 Ec = 11.5607

4   Pass
%% Ef = 1000; Em = 10; Vf = 3; Vm = 7; b_str = 'U'; [Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm); assert(abs(Ec - 307) < 1e-4)

ff = 0.3000 Ec_l = 14.2248 Ec_u = 307 Ec = 307

5   Pass
%% Ef = 1000; Em = 10; Vf = 2.2; Vm = 7.8; b_str = 'lower bound'; [Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm); assert(abs(Ec - 12.7845) < 1e-4)

ff = 0.2200 Ec_l = 12.7845 Ec_u = 227.8000 Ec = 12.7845

6   Pass
%% Ef = 1000; Em = 10; Vf = 30; Vm = 170; b_str = 'U bound'; [Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm); assert(abs(Ec - 158.5) < 1e-4)

ff = 0.1500 Ec_l = 11.7440 Ec_u = 158.5000 Ec = 158.5000

7   Pass
%% Ef = 57; Em = 3.9; Vf = 1.27; Vm = 9; b_str = 'Lower'; [Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm); assert(abs(Ec - 4.4078) < 1e-4)

ff = 0.1237 Ec_l = 4.4078 Ec_u = 10.4664 Ec = 4.4078