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: prgPrecode.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: %prgPrecode precoding for PDSCH Precoding Resource Block Group (PRG) bundling
%   [ANTSYM,ANTIND] = prgPrecode(SIZ,NSTARTGRID,PORTSYM,PORTIND,F)
%   performs precoding for PDSCH PRG bundling according to TS 38.214
%   Section 5.1.2.3, to produce precoded symbols ANTSYM and corresponding
%   indices ANTIND. ANTSYM is a matrix of size NRE-by-P where NRE is number
%   of PDSCH resource elements, and P is the number of antennas. ANTIND is
%   also of size NRE-by-P.
%
%   SIZ is the size of the car
    
function [symout,indout] = hPrecode(siz,symin,indin,F,prgsubs)
    
    % Dimensionality information
    ndims = max(length(siz),3);
    outplanedim = size(F,2);
    NPRG = size(F,3);
    outdims = [siz(1:(ndims-1)) outplanedim];
    
    % Create empty antenna grid
    antgrid = zeros(outdims);
    
    % For each PRG
    for prg = 1:NPRG
        
        % Create array of logical indices indicating which indices and 
        % symbols correspond to this PRG
        thisprg = (prgsubs==prg);

        % If no indices or symbols correspond to this PRG, move to the 
        % next PRG
        if (~any(thisprg))
            continue;
        end