Problem 1578. Volume and area of a sphere

Solution 256200

Submitted on 6 Jun 2013 by Aditya Suryavanshi
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, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
%% x = 1; y = 4*pi()/3; z = 4*pi(); [a,b]=sphere(x); assert(isequal(a,y)&isequal(b,z))

s = 12.5664 ans = 4.1888

2   Pass
%% x = 4; y = 256*pi()/3; z = 64*pi(); [a,b]=sphere(x); assert(isequal(a,y)&isequal(b,z))

s = 201.0619 ans = 268.0826

Suggested Problems

More from this Author9

Community Treasure Hunt

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

Start Hunting!