Cody

Problem 42825. solid of revolution

Solution 4508003

Submitted on 30 Dec 2020 by Alisio
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
P=0; a=0; b=1; V_correct=0; assert(abs(solid_of_revolution(P,a,b) - V_correct) < tolerance);

2   Pass
P=1; a=0; b=1; V_correct=1; assert(abs(solid_of_revolution(P,a,b) - V_correct) < tolerance);

3   Pass
P=[1 0]; a=0; b=1; V_correct=1/3; assert(abs(solid_of_revolution(P,a,b) - V_correct) < tolerance);

4   Pass
P=[1 1 1]; a=1; b=4; V_correct=4131/10; assert(abs(solid_of_revolution(P,a,b) - V_correct) < tolerance);


Community Treasure Hunt

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

Start Hunting!