Cody

Solution 1679097

Submitted on 22 Nov 2018 by Alan
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
n_in = 3; n_out = 3; theta_crit_correct = -1; assert(isequal(totalInternalReflection(n_in,n_out),theta_crit_correct))

theta_crit = -1

2   Pass
n_in = 1; n_out = 1.333; theta_crit_correct = -1; assert(isequal(totalInternalReflection(n_in,n_out),theta_crit_correct))

theta_crit = -1

3   Pass
n_in = 1.333; n_out = 1; theta_crit_correct = 49; assert(isequal(totalInternalReflection(n_in,n_out),theta_crit_correct))

theta_crit = 49

4   Pass
n_in = 4; n_out = 3; theta_crit_correct = 49; assert(isequal(totalInternalReflection(n_in,n_out),theta_crit_correct))

theta_crit = 49

5   Pass
n_in = 4; n_out = 2; theta_crit_correct = 30; assert(isequal(totalInternalReflection(n_in,n_out),theta_crit_correct))

theta_crit = 30