MATLAB Answers

I didn't know how to find r

15 views (last 30 days)
Kinda Al Kindi
Kinda Al Kindi on 14 Oct 2021
Answered: Star Strider on 14 Oct 2021
A cube has a side of 18cm.
(a) Determine the radius of a sphere that has the same surface area
as the cube.
a=6*18*18
a= @(r ) (4*pi*r.^2)
(b) Determine the radius of a sphere that has the same volume as the cube.

Answers (2)

Jan
Jan on 14 Oct 2021
a = 6 * 18 * 18
a = 4 * pi * r.^2
r = sqrt(6 * 18 * 18 / (4 * pi))

Star Strider
Star Strider on 14 Oct 2021
A different approach —
ac = 6*18*18
ac = 1944
as = @(r) (4*pi*r.^2)
as = function_handle with value:
@(r)(4*pi*r.^2)
r = fzero(@(r) ac - as(r), -1)
r = 12.4378
Check_Equal_Areas = ac - as(r)
Check_Equal_Areas = 0
This solves for the ‘r’ value that makes the sphere area equal to the cube area. See the codumentation for the function to understand how it works.
.

Community Treasure Hunt

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

Start Hunting!

Translated by