Problem 43940. Hydrostatic Pressure
Given depth(height), in m, find the pressure under a body of water. Need to know the density of water(kg/m^3), and gravity(m/s^2).
Solution Stats
Problem Comments
-
3 Comments
The test suite has been updated to test against a tolerance rather than using isequal.
It's good that the Test Suite was fixed, but the Problem Statement is still inadequate. Liquid water's density varies with temperature, e.g. ~965 kg/m³ at 90 °C, and gravity varies with latitude and elevation, e.g. ~9.78 m/s² at the poles. Density and gravity need to be either specified in the problem statement or else provided as inputs. —DIV
The employed gravity and density values should be part of the problem. Water density changes according to temperature. And according to the gravity's precision, results may vary. It seems that the values used were 9.81 m/s² for gravity and 1029 kg/m³ for water density, which is the maximum value for sea water.
Solution Comments
Show commentsProblem Recent Solvers68
Suggested Problems
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2056 Solvers
-
9119 Solvers
-
Change the first and last diagonal element of the identity matrix to zero
146 Solvers
-
Create sequnce 1 4 9 16 25.........
294 Solvers
-
3549 Solvers
More from this Author7
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!