Engineers often use tabulated data for various calculations. An important method that any good engineer should be able to apply to tabulated data is Interpolation. In thermodynamics, the properties of a gas can be known when two of its properties have been fixed. You are required to come up with a continuous MATLAB function being given the tabulated data below measured where the pressure is 0.10 MPa:
Write a function called lookup that consumes three parameters: the above table in an array table, a number value and a logical control value getTemp. If getTemp is true, the function interpolates the value as a specific volume and returns the corresponding temperature. Otherwise, it interpolates the value as a temperature and returns the corresponding specific volume.