Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create MATLAB code to perform the following calculations: 5^2 5 + 3/5 middot 6 S

ID: 3808812 • Letter: C

Question

Create MATLAB code to perform the following calculations: 5^2 5 + 3/5 middot 6 Squareroot 4 + 6^3 9 6/12 + 7 middot 5^3 + 2 1 + 5 middot 3/6^2 + 2^2 - 4 middot 1/5.5 Check your code by entering it into MATLAB and performing the calculations on your scientific calculator. As you answer the following questions, consider the shapes shown in Figure P2.4. (a) The area of a circle is pi r^2. Define r as 5, then find the area of a circle, using MATLAB (b) The surface area of a sphere is 4 pi r^2. Find the surface area of a sphere with a radius of 10 ft. (c) The volume of a sphere is 4/3 pi r^3. Find the volume of a sphere with a radius of 2 ft. As you answer the following questions, consider the shape shown in Figure P2.5. (a) The area of a square is the edge length squared (A = edge^2). Define the edge length as 5, then find the area of a square, using MATLAB (b) The surface area of a cube is 6 times the edge length squared (SA = 6 times edge^2). Find the surface area of a cube with edge length 10. (c) The volume of a cube is the edge length cubed (V = edge^3). Find the volume of a cube with edge length 12.

Explanation / Answer

2.3

a = 5^2
b = (5+3)/(5*6)
c = sqrt(4+6^3)
d = 9+6/12+7*5^(3+2)
e = 1 + 5*3/6^2 + 2^(2-4)*1/5.5

---OUTPUT---

a =  25                                                                             

b =  0.26667                                                                        

c =  14.832                                                                         

d =    2.1884e+04                                                                   

e =  1.4621

2.4

a.
r = 5;
area = pi*r^2
OUTPUT: area =  78.540

b.
r = 10;
area = 4*pi*r^2
OUTPUT: area =  1256.6

c.
r = 2;
area = 4/3*pi*r^3
OUTPUT: area =  33.510

2.5

a.
edge = 5;
area = edge^2

OUTPUT: area =  25   

b
edge = 10;
sArea = 6 * edge^2

OUTPUT: sArea =  600   

c
edge = 12;
vol = edge^3
OUTPUT: vol =  1728

Hopefully this solves your problem. You can comment below for other queries.