Cody

# Problem 1442. Volume of a Simplex

Solution 235400

Submitted on 24 Apr 2013 by Marco Castelli
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, log in.

### Test Suite

Test Status Code Input and Output
1   Pass
user_solution = fileread('simplexvolume.m'); assert(isempty(strfind(user_solution,'regexp'))); assert(isempty(strfind(user_solution,'2str'))); assert(isempty(strfind(user_solution,'str2'))); assert(isempty(strfind(user_solution,'interp')));

2   Pass
%% n = 0; V_correct = 1.0; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 1

3   Pass
%% n = 1; V_correct = 1.0; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 1

4   Pass
%% n = 2; V_correct = 0.433012701892219; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 0.4330

5   Pass
%% n = 3; V_correct = 0.117851130197758; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 0.1179

6   Pass
%% n = 4; V_correct = 0.023292374765623; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 0.0233

7   Pass
%% n = 5; V_correct = 0.003608439182435; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 0.0036

8   Pass
%% n = 6; V_correct = 0.000459331824838; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 4.5933e-04

9   Pass
%% n = 7; V_correct = 0.000049603174603; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 4.9603e-05

10   Pass
%% n = 8; V_correct = 0.000004650297619; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 4.6503e-06

11   Pass
%% n = 9; V_correct = 0.000000385125244; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 3.8513e-07

12   Pass
%% n = 10; V_correct = 0.000000028561653; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 2.8562e-08

13   Pass
%% n = 11; V_correct = 0.000000001917653; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 1.9177e-09

14   Pass
%% n = 12; V_correct = 0.000000000117613; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 1.1761e-10

15   Pass
%% n = 13; V_correct = 0.000000000006639; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 6.6388e-12

16   Pass
%% n = 14; V_correct = 0.000000000000347; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 3.4708e-13

17   Pass
%% n = 15; V_correct = 0.000000000000017; assert(abs(simplexvolume(n)-V_correct)<4*eps)

V = 1.6898e-14