Main Content

lteSLResourceGridSize

Sidelink subframe resource array size

Description

dim = lteSLResourceGridSize(ue) returns a 3-element row vector of dimension lengths for the resource grid array that you can generate from the specified UE settings structure. By default, the number of antennas is set to 1 for single-port sidelink transmissions.

For more information on the resource grid and the multidimensional array used to represent the resource elements for one subframe across all configured antenna ports, see Represent Resource Grids.

example

dim = lteSLResourceGridSize(ue,ntxants) accepts the number of antenna planes as an optional input.

example

Examples

collapse all

Use the vector returned by lteSLResourceGridSize to create a MATLAB® array. Valid and equivalent sidelink subframe resource grids can be created using the lteSLResourceGrid function or the MATLAB zeros function.

Create a UE settings structure. Use the output from lteSLResourceGridSize as input to zeros to generate an empty resource grid.

ue = struct('NSLRB',6,'CyclicPrefixSL','Normal');

reGrid1 = zeros(lteSLResourceGridSize(ue));

Generate another empty resource grid, this time use lteSLResourceGrid.

reGrid2 = lteSLResourceGrid(ue);

Confirm the two grids are identical.

isequal(reGrid1,reGrid2)
ans = logical
   1

Create an empty resource grid for two antenna planes using the vector returned by lteSLResourceGridSize and the function zeros.

Create a UE settings structure and define a local variable for the number of antennas.

ue = struct('NSLRB',6,'CyclicPrefixSL','Normal');
ntxant = 2;

Generate an empty resource grid.

reGrid = zeros(lteSLResourceGridSize(ue,ntxant));
size(reGrid)
ans = 1×3

    72    14     2

The third dimension indicates that two antenna planes are defined in the output grid.

Input Arguments

collapse all

User equipment settings, specified as a structure containing these parameter fields:

Number of sidelink resource blocks, specified as an integer scalar from 6 to 110.

Example: 6, which corresponds to a channel bandwidth of 1.4 MHz.

Data Types: double

Cyclic prefix length, specified as 'Normal' or 'Extended'.

Data Types: char | string

Number of transmit antenna planes, specified as a positive integer.

Data Types: double

Output Arguments

collapse all

Dimension lengths of resource grid array, returned as a 3-element row vector, [NSC NSYM NTX].

  • NSC is the number of subcarriers, 12*ue.NSLRB.

  • NSYM is the number of SC-FDMA symbols in a subframe—14 for normal cyclic prefix or 12 for extended cyclic prefix.

  • NTX is the number of transmission antenna planes.

Version History

Introduced in R2016b