Cody

Solution 558575

Submitted on 16 Jan 2015 by Jon
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
%% 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))

2   Pass
%% 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

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