Create a matlab program

A wood circular cylinder, having a specific gravity, S, of 0.54, floats in water as shown in Figure P4.

488_MATLAB function.png

Figure

For a floating body, the weight of the floating body equals the weight of fluid displaced, thus

2391_MATLAB function1.png where

S = the specific gravity of the wood.

γw= the specific weight of water.

R = the radius of the cylinder.

L = the cylinder length.

V = the volume of water displaced

1443_MATLAB function2.png

The integral was obtained from integral tables. Substituting the limits of integration gives:

2258_MATLAB function3.png

Substituting Equation c) into Equation (a) and rearranging terms and dividing by R2 gives:

2284_MATLAB function4.png (d)

Create a MATLAB program that will use MATLAB’s fzero function to determine d for the following parameters: R = 0.5 m and in steps of 0.1. Create a table consisting of S and d.

find the cost of your paper