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

Engineering Computation with Matlab *book used 1. Write a function to obtain the

ID: 3749284 • Letter: E

Question

Engineering Computation with Matlab *book used 1. Write a function to obtain the time needed to fill a container shaped like a glass (truncated cone) of any size for any specified flow rate. (Modification of 2.9). 2. Modification of 2.10: Write a function to obtain the time spent by the second diver in the head first position and height at which the two divers meet if the second diver delays jumping for t seconds. Both the divers are jumping from height H. 3. Modification of 2.7: Write a function to obtain solution to the home loan problem for any home price, down payment, APR and loan period. 4. Modification of Homework 1 problem 1: The company could have invested the revenue lost due to leaking steam at arn APR of r%. The investment is made monthly. Write a function to obtain the total revenue lost over two years as a function of stream pressure Ps, orifice diameter D, steam cost c, and APR r.

Explanation / Answer

Answer to Question 1:

Assumption: The unit of measurement for time, dimensions of truncated cone and flowrate are consistant. These measurements are taken as input parameters to the function.

public static float TimeRequired(float height, float baseRadius, float topRadius, float flowRate)
{
float time = 0f;
double volume;
//Validating all inputs are correct
if (height <= 0 || baseRadius <= 0 || topRadius <= 0 || flowRate <= 0)
{
Console.WriteLine("Invalid Input!! All values must be positive");
}

//Calculating the volume of truncated cone i.e. frustum
volume = Convert.ToDouble(Math.PI * height * (topRadius * topRadius + baseRadius * baseRadius + topRadius * baseRadius) / 3);

//Calculating the time required to fill the truncated cone as time = volume/flowrate
time = (float)(volume / flowRate);

return time;

}

Other question need more information and a little bit of subject knowledge.