Water flows steadily through the variable area horizontal pipe shown in Fig. P3.3. The centerline velocity is given by where x is in feet. Viscous effects are neglected. (a) Determine the pressure gradient, 1as a function of x2 needed to produce this flow. (b) If the pressure at section 112 is 50 psi, determine the pressure at 122 by 1i2 integration of the pressure gradient obtained in (a), 1ii2 application of the Bernoulli equation.
ENGR 121 B Lab Notes for 10/12/2016 Spencer Kociba ● Function writing in MATLAB ○ Function output=name(input) ○ End (final line in the function code ○ Assign a value to your output argument in the body of the function. ○ When saving, make the file name the same as the function name ○ Function[ ___, ___] ■ To put multiple output arguments (same with the input) ■ With multiple outputs, need to put a vector 1xn outputs in order to see all of them displayed ● To comment on a group rather than a line you must use %{%} but they must be on separate lines ○ Ex. %{ This ■ Is ■ A comment ■ %}