task 1 should be completed now
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
function [numPacketErrors, numPacketsSimulated ]= simulateTransmission(cfgEHT, channel, maxChDelay, snr, maxNumPackets, maxNumErrors, simParameters, chanBW, substreamIndex, elevationAngles)
|
||||
function [numPacketErrors, numPacketsSimulated, cfrMagnitudes]= simulateTransmission(cfgEHT, channel, maxChDelay, snr, maxNumPackets, maxNumErrors, simParameters, chanBW, substreamIndex, elevationAngles)
|
||||
numPacketErrors = 0;
|
||||
numPacketsSimulated = 0;
|
||||
cfrMagnitudes = [];
|
||||
|
||||
ofdmInfo = wlanEHTOFDMInfo('EHT-Data', cfgEHT);
|
||||
ind = wlanFieldIndices(cfgEHT);
|
||||
|
||||
if nargin < 8
|
||||
if nargin < 9
|
||||
substreamIndex = 1;
|
||||
end
|
||||
if nargin < 10
|
||||
elevationAngles = simParameters.ElevationAngle * ones(1, maxNumPackets);
|
||||
end
|
||||
|
||||
stream = RandStream('combRecursive', Seed=simParameters.Seed);
|
||||
stream.Substream = substreamIndex;
|
||||
@@ -57,6 +61,8 @@ function [numPacketErrors, numPacketsSimulated ]= simulateTransmission(cfgEHT, c
|
||||
heltfDemod = wlanEHTDemodulate(rxHELTF, "EHT-LTF", cfgEHT);
|
||||
[chanEstimate, pilotEstimate] = wlanEHTLTFChannelEstimate(heltfDemod, cfgEHT);
|
||||
|
||||
cfrMagnitudes(:, end + 1) = abs(chanEstimate(:, 1, 1));
|
||||
|
||||
rxData = rx(packetOffset + (ind.EHTData(1) : ind.EHTData(2)), :);
|
||||
demodSym = wlanEHTDemodulate(rxData, "EHT-Data", cfgEHT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user