Make a function that will calculate the pressure psi given


Assignment

For this exam you will be creating functions and scripts in Scilab. You will turn in the Scilab files to Moodie for grading or by giving the instructor a co of the files before leavin so that oucan get credit for the exam. Also, turn in this document with your name as evidence that you were present for the exam.

Note: This work is to be done by you. DO NOT search the web for answers or ask your neighbor for help. Any evidence of cheating will result in a zero for the exam.

Part I

Make a function that will calculate the Pressure [psi] given the Specific Gravity, Depth, and the acceleration of gravity. (Pay close attention to your units)

• function [Pressure] = Phydro (InputMatrix)
• The function will take in a matrix with 3 rows and any number of columns.

o Row 1 = Specific Gravity.
o Row 2 = Depth [m].
o Row 3 = gravity [m/s^2]

• The function will output a matrix with the resulting pressures in units of [psi]

Part II

Write a script in Scilab that will graph the Hydrostatic Pressure of four different liquids over a depth of zero to 20 meters on one graph.

• Use Earth's gravity of 9.8 [m/s^2] for this calculation.
• Remember to include the graph title, label x and y values (Don't use x-axis and axis), include units, and a legend.
• Graph the Hydrostatic pressure in units of [psi] of the four different Specific

Gravity values given below.

o Gasoline SG = 0.739
o Water SG = 1
o Glycerin SG = 1.26
o Iodine SG = 4.93.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Make a function that will calculate the pressure psi given
Reference No:- TGS02240292

Expected delivery within 24 Hours