Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
a = 1; b = 2; alpha = 135;
y_correct = 0.0505;
F = view_factor3(a,b,alpha);
assert(F < (y_correct + 1e-4))
assert(F > (y_correct - 1e-4))
|
2 | Pass |
a = 4; b = 1; alpha = [45 90 135 180];
y_correct = [0.8160 0.4384 0.1200 0];
F = view_factor3(a,b,alpha);
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 |
a = [1 2 5 10 1 2 5 10];
b = [2 5 2 5 2 5 2 5];
alpha = [60 60 60 60 120 120 120 120];
y_correct = [0.3170 0.2641 0.6603 0.6340 0.0886 0.0755 0.1888 0.1771];
F = view_factor3(a,b,alpha);
for i = 1:numel(y_correct)
assert(F(i) < (y_correct(i) + 1e-4))
assert(F(i) > (y_correct(i) - 1e-4))
end
|
Find all elements less than 0 or greater than 10 and replace them with NaN
13051 Solvers
495 Solvers
Getting the indices from a vector
3210 Solvers
216 Solvers
259 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!