%% Create Empty Sidelink Resource Array Using Grid Size
% 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)

% Copyright 2012 The MathWorks, Inc.