You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: proportionalFair.m
    path of file: ./repos/5G_based_System_level_Integrated_Sensing_and_Communication_Simulator/+communication/+scheduling
    
    the code of the file until where you have to start completion: classdef proportionalFair < communication.scheduling.schedulerEntity
    %proportionalFair Implements proportional fair scheduler

    %   Copyright 2020-2021 The MathWorks, Inc.

    properties
        % MovingAvgDataRateWeight Moving average parameter to calculate the average data rate
        MovingAvgDataRateWeight (1, 1) {mustBeNumeric, mustBeNonempty,...
                     mustBeGreaterThanOrEqual(MovingAvgDataRateWeight, 0),...
                     mustBeLessThanOrEqual(MovingAvgDataRateWeight, 1)} = 0.5;

        % UEsServedDataRate Stores DL and UL served data rate for each UE 
        % N-by-2 matrix where 'N' is the number of UEs. For each UE, gNB
        % maintains a context which is used in taking scheduling decisions.
        % There is one row for each UE, indexed b
    
function updateUEServedDataRate(obj, linkType, resourceAssignments)
            %updateUEServedDataRate Update UEs' served data rate based on RB assignments
            
            if linkType % Uplink
                mcsTable = obj.MCSTableUL;
                pusch = obj.PUSCHConfig;
                % UL carrier configuration object
                ulCarrierConfig = obj.CarrierConfigUL;
            else % Downlink
                mcsTable = obj.MCSTableDL;
                pdsch = obj.PDSCHConfig;
                % DL carrier configuration object
                dlCarrierConfig = obj.CarrierConfigDL;
            end
            
            % Store UEs which got grant
            scheduledUEs = zeros(length(obj.UEs), 1);
            % Update served data rate for UEs which got grant
            for i = 1:length(resourceAssignments)
                resourceAssignment = resourceAssignments{i};
                scheduledUEs(i) = resourceAssignment.RNTI;
                averageDataRate = obj.UEsServedDataRate(resourceAssignment.RNTI ,linkType+1);
                mcsInfo = mcsTable(resourceAssignment.MCS + 1, :);
                modSchemeBits = mcsInfo(1); % Bits per symbol for modulation scheme
                codeRate = mcsInfo(2)/1024;
                % Modulation scheme and corresponding bits/symbol
                fullmodlist = ["pi/2-BPSK", "BPSK", "QPSK", "16QAM", "64QAM", "256QAM"]';
                qm = [1 1 2 4 6 8];
                modScheme = fullmodlist((modSchemeBits == qm)); % Get modulation scheme string
               
                if linkType % Uplink
                    pusch.SymbolAllocation = [resourceAssignment.StartSymbol resourceAssignment.NumSymbols];
                    pusch.MappingType = resourceAssignment.MappingType;
                    if pusch.MappingType == 'A'
                        dmrsAdditonalPos = obj.PUSCHDMRSAdditionalPosTypeA;
                    else
                        dmrsAdditonalPos = obj.PUSCHDMRSAdditionalPosTypeB;
                    end