Cody

# Problem 2831. Radiation Heat Transfer — View Factors (4)

Solution 1976899

Submitted on 15 Oct 2019
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   Fail
d = 1; b = 2; n = 1; y_correct = 0.6576; F = view_factor4(d,b,n); assert(F < (y_correct + 1e-4)) assert(F > (y_correct - 1e-4))

Index exceeds the number of array elements (0). Error in view_factor4 (line 7) F(i) = round(1 -(1- (f12(i)))^n(i),4); Error in Test1 (line 3) F = view_factor4(d,b,n);

2   Fail
d = 2; b = 10; n = [1 2 4 8 16 32]; y_correct = [0.2941 0.5017 0.7517 0.9383 0.9962 1.0000]; F = view_factor4(d,b,n); for i = 1:numel(y_correct) assert(F(i) < (y_correct(i) + 1e-4)) assert(F(i) > (y_correct(i) - 1e-4)) end

Index exceeds the number of array elements (0). Error in view_factor4 (line 7) F(i) = round(1 -(1- (f12(i)))^n(i),4); Error in Test2 (line 3) F = view_factor4(d,b,n);

3   Pass
d = [0.25 0.5 1 1.25 2.5 4 5]; b = [4 10 2.5 2 3 10 11]; n = [1 2 2 1 1 5 5]; y_correct = [0.0962 0.1486 0.7950 0.7792 0.9353 0.9810 0.9908]; F = view_factor4(d,b,n); for i = 1:numel(y_correct) assert(F(i) < (y_correct(i) + 1e-4)) assert(F(i) > (y_correct(i) - 1e-4)) end