Reading from a sensor using MATLAB

I know that wasn't really a great question, so let me try to be more specific. Let me ask this:

The BME sensor is on a printed circuit board, which is connected to the Arduino Uno. The BME pins (data sheet) are not directly connected to any of the Arduino's pins (I didn't design the circuit), but the BME outputs each control a transistor, and the outputs from the transistors can be read at A4 and A5.

When I run the system through the Arduino IDE, I simply define the BME object then use bme.readTemperature(). The readTemperature() function is defined in the .cpp file that was downloaded from GitHub:

float Adafruit_BME280::readTemperature(void)
{
    int32_t var1, var2;

    int32_t adc_T = read24(BME280_REGISTER_TEMPDATA);
    if (adc_T == 0x800000) // value in case temp measurement was disabled
        return NAN;
    adc_T >>= 4;

    var1 = ((((adc_T>>3) - ((int32_t)_bme280_calib.dig_T1 <<1))) *
            ((int32_t)_bme280_calib.dig_T2)) >> 11;
             
    var2 = (((((adc_T>>4) - ((int32_t)_bme280_calib.dig_T1)) *
              ((adc_T>>4) - ((int32_t)_bme280_calib.dig_T1))) >> 12) *
            ((int32_t)_bme280_calib.dig_T3)) >> 14;

    t_fine = var1 + var2;

    float T = (t_fine * 5 + 128) >> 8;
    return T/100;
}

So for example, the coefficient bme280_calib.dig_T1 is defined as read16_LE(BME280_REGISTER_DIG_T1) in the .cpp file, and in turn BME280_REGISTER_DIG_T1 is assigned a hexadecimal number (0x88) in the .h file. I understand that the list of hexadecimal commands needs to be added to the MATLAB add-on class file.

When I run the Arduino through through MATLAB, I am under the impression I would use these commands (via sendCommand) to calculate the temperature (and pressure and humidity). The question is, where does the calculation go? Do I put the .cpp file somewhere in my MATLAB folders and tell the system to look at that? Do I transfer all the calculations done in the .cpp file to the .h file? Or do I do the calculations in the MATLAB script itself?