Cody

Problem 2833. Radiation Heat Transfer — View Factors (5)

Solution 558585

Submitted on 16 Jan 2015 by Jon
• Size: 39
• This is the leading solution.
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 2]; b = [3 5 6 7 8]; n = 1; y_correct = [0.1885 0.2142 0.2479 0.2941 0.3613 0.4077 0.4675 0.4675 0.5472 0.8154]; F = sort(view_factor5(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

2   Pass
%% d = [2 2.2 2.4 2.5]; b = [3.2 3.4 3.6]; n = 2; y_correct = [0.9182 0.9352 0.9455 0.9512 0.9594 0.9659 0.9720 0.9738 0.9767 0.9831 0.9857 0.9905]; F = sort(view_factor5(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 = [1 1.1 1.2]; b = [3 3.2]; n = 1:5; y_correct = [0.4416 0.4675 0.4803 0.5080 0.5179 0.5472 0.6882 0.7165 0.7299 0.7579 0.7676 0.7950 0.8259 0.8490 0.8596 0.8809 0.8879 0.9028 0.9072 0.9196 0.9270 0.9414 0.9457 0.9460 0.9572 0.9580 0.9621 0.9712 0.9740 0.9810]; F = sort(view_factor5(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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!