function interpolated_data = interpolate_CTD_to_5min_grid(CTD)
    % Assume CTD is a table with columns 'utc_time', 'Temp', and 'Salinity'
    % 'utc_time' contains the measurement timestamps
    % 'Temp' and 'Salinity' contain the corresponding values

    % Create a common 5-minute time grid
    common_time_grid = datetime(min(CTD.utc_time):minutes(5):max(CTD.utc_time))';

    % Interpolate the 'Temp' and 'Salinity' columns onto the common time grid
    interpolated_temp = interp1(CTD.utc_time, CTD.Temp, common_time_grid);
    interpolated_salinity = interp1(CTD.utc_time, CTD.Salinity, common_time_grid);

    % Combine the interpolated values into a new table
    interpolated_data = table(common_time_grid, interpolated_temp, interpolated_salinity);

    % Note: You can specify other interpolation methods (e.g., 'spline', 'pchip', etc.)
    % by providing an additional argument to interp1 if needed.
end
