24 lines
700 B
Mathematica
24 lines
700 B
Mathematica
![]() |
function byte = HESU_gen(byteIn,psduLength,userIdx)
|
||
|
PSDULength = psduLength(userIdx);
|
||
|
%Create a sequence of data bits and generate an HE SU waveform.
|
||
|
byteInLen=size(byteIn,1);
|
||
|
|
||
|
bits = zeros(8*PSDULength,1,'double');
|
||
|
%bits = randi([0 1],8*PSDULength,1,'int8');
|
||
|
|
||
|
if(byteInLen > 1)
|
||
|
if(byteInLen <= PSDULength)
|
||
|
bits(1:8*byteInLen) = int8(int2bit(byteIn,8));
|
||
|
else
|
||
|
bits = int8(int2bit(byteIn(1:PSDULength),8));
|
||
|
end
|
||
|
end
|
||
|
|
||
|
byte = int16(bit2int(bits,8));
|
||
|
|
||
|
%sr = wlanSampleRate(cfgHESU); % Sample rate
|
||
|
% TxWaveform = wlanWaveformGenerator(bits,cfgHESU);
|
||
|
%TxWaveform = wlanWaveformGenerator(bits,cfgHESU);
|
||
|
% TxWaveform = 0.25.*TxWaveform;
|
||
|
%Rx = TxWaveform;
|
||
|
end
|