I am trying to convert the code created using the SIB1 Recovery Example of 5G toolbox into C code through Matlab coder.
However, many errors occurred and were corrected, but the two errors below have not yet been corrected.
First,
rxGrid = nrOFDMDemodulate(rxWaveform_1, nrb, scsCommon, nSlot,'SampleRate',Fs,'CarrierFrequency',fPhaseComp);
Error Message : In code generation, when you specify the 'SampleRate' name-value argument in the nrOFDMDemodulate(WAVEFORM,NRB,SCS,INITIALNSLOT,NAME,VALUE) syntax, the 'SampleRate' and 'Nfft' name-value arguments and the NRB and SCS arguments must be compile-time constants.
If the above syntax is changed as follows, incorrect operation will occur.
rxGrid = nrOFDMDemodulate(rxWaveform_1, nrb, scsCommon, nSlot);
Second,
[sib1bits,sib1CRC] = decodeDLSCH(cw,pdsch.Modulation,pdsch.NumLayers,dci.RedundancyVersion);
Error Message : When generating code, the NLAYERS input must be a constant value.
Can you resolve errors that occur in Matlab Coder?