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: phyRxBuffer.m
    path of file: ./repos/5G_based_System_level_Integrated_Sensing_and_Communication_Simulator/+communication/+phyLayer
    
    the code of the file until where you have to start completion: classdef phyRxBuffer < handle
%phyRxBuffer Create a Phy signal reception buffer object. This class
%implements the buffering of received signals and adding of interfering
%signals to get the resultant signal
%
%   phyRxBuffer methods:
%
%   addWaveform           - Store the received waveform along with metadata
%
%   getReceivedWaveform   - Return the received waveform after applying
%                           interference
%
%   hNRPhyRxBuffer properties:
%
%   BufferSize   - Maximum number of signals to be stored in the buffer
%
%   WaveformExpirationTime - Waveforms older than WaveformExpirationTime
%  (in microseconds) are considered as obsolete
%
%   Example 1:
%   % Create a hNRPhyRxBuffer object with default properties.
%
%   rxBufferObj = hNRPhyRxBuffer
%
%   Example 2: % Create a hNRPhyRxBuffer object specifying a buffer size of
%   100 and buffer cleanup time of 500 (i
    
function addWaveform(obj, signalInfo)
            %addWaveform Add the received signal to the buffer
            %
            %   addWaveform(OBJ, SIGNALINFO) Adds the received signal to
            %   the buffer
            %
            %   SIGNALINFO is a structure with these fields:
            %       Waveform    : IQ samples of the received signal
            %                     represented as an M x N matrix. 'M'
            %                     is the number of IQ samples and 'N'
            %                     is the number of Rx antennas.
            %       NumSamples  : Length of the waveform (number of IQ
            %                     samples). It is a scalar and represents
            %                     the number of samples in the waveform
            %       SampleRate  : Sample rate of the waveform. It is a
            %                     scalar
            %       StartTime   : Current timestamp of the receiver at
            %                     signal entry (in microseconds). It is a
            %                     scalar

            removeObsoleteWaveforms(obj, signalInfo.StartTime-obj.WaveformExpirationTime);

            % Get an index in the signal buffer to store the received
            % signal
            idx = getStoreIndex(obj);

            if idx ~= 0
                % Store the signal along with metadata
                obj.ReceivedSignals(idx).Waveform = signalInfo.Waveform;
                obj.ReceivedSignals(idx).NumSamples = signalInfo.NumSamples;
                obj.ReceivedSignals(idx).SampleRate = signalInfo.SampleRate;
                obj.ReceivedSignals(idx).StartTime = signalInfo.StartTime;
                % Sample duration (in microseconds)
                sampleDuration = 1e6 * (1 / signalInfo.SampleRate);
                waveformDuration = signalInfo.NumSamples * sampleDuration;
                % Signal end