The radius, r, of a sphere can be calculated from its volume, V, by: r = 3 squar
ID: 3797274 • Letter: T
Question
The radius, r, of a sphere can be calculated from its volume, V, by: r = 3 squareroot 3/4 V/pi The surface area of a sphere, S, is given by: S = 4 pi r^2 Determine the radius and surface area of spheres with volumes of 4,000, 3, 500, 3,000, 2, 500, 2,000, 1, 500 and 1,000 in^3. Display the results in a three-column table where the values of r, V, and S are displayed in the first, second, and third columns, respectively. The values of r and S that are displayed in the table should be rounded to the nearest tenth of an inch.Explanation / Answer
v=[4000,3500,3000,2500,2000,1500,1000];
b=zeros(7,3); %array for storing r,v,s values
for i=1:7
t=(3*v(i))/(4*pi);
r=nthroot(t,3); %cube root function
b(i,1)=r;
b(i,2)=v(i);
b(i,3)=2*pi*r*r;
end
clc;
disp(b); %printing actual values
disp(floor(b)); %nearest values using floor values
disp(ceil(b)); %nearest values using ceil values
output:-
1.0e+003 *
0.0098 4.0000 0.6093
0.0094 3.5000 0.5574
0.0089 3.0000 0.5030
0.0084 2.5000 0.4454
0.0078 2.0000 0.3838
0.0071 1.5000 0.3168
0.0062 1.0000 0.2418
9 4000 609
9 3500 557
8 3000 502
8 2500 445
7 2000 383
7 1500 316
6 1000 241
10 4000 610
10 3500 558
9 3000 503
9 2500 446
8 2000 384
8 1500 317
7 1000 242
>>