added progress bars

This commit is contained in:
ti_mo
2026-06-12 12:51:24 +02:00
parent 1918447edc
commit 021617fe50
5 changed files with 1034 additions and 6 deletions
+15 -2
View File
@@ -3,13 +3,21 @@ apep_values = [250 1000 4000 8000 12000];
results = zeros(numel(apep_values), numel(snrs));
f = waitbar(0, "Starting APEP sweep");
progressTotal = numel(apep_values) * numel(snrs);
progressQueue = parallel.pool.DataQueue;
parfor_waitbar(f, progressTotal, "Starting APEP sweep", true);
progressListener = afterEach(progressQueue, @(info) parfor_waitbar(f, progressTotal, info, false));
for apep_idx = 1 : numel(apep_values)
currentApep = apep_values(apep_idx);
[cfgEHT, simParameters, channel, chInfo, maxChDelay, satelliteDopplerShift, chanBW] = ...
create_baseline_configuration(ntn_tdl_delay_profiles(3), bandwidth, false, "None", ...
carrier_frequency, 0, ...
0, leo_altitude, random_stream, ...
seed, tx_antenna_count, ...
rx_antenna_count, apep_values(apep_idx));
rx_antenna_count, currentApep);
cfgEHT.User{1}.MCS = mcs_t1;
@@ -21,9 +29,15 @@ for apep_idx = 1 : numel(apep_values)
[errorCount, packetCount, cfrMagnitudes] = simulateTransmission(cfgEHT, local_channel, maxChDelay, snrs(snr_idx), packets_per_snr, maxNumErrors, simParameters, chanBW, snr_idx, elevationAngles);
end
results(apep_idx, snr_idx) = errorCount / packetCount;
send(progressQueue, sprintf("APEP %d | SNR %.1f dB", currentApep, snrs(snr_idx)));
end
end
delete(progressListener);
if ishandle(f)
close(f);
end
markers = 'ox*sd^v><ph+ox*sd^v><ph+';
figure;
@@ -39,4 +53,3 @@ ylabel('PER');
dataStr = arrayfun(@(x)sprintf('APEP %d', x), apep_values, 'UniformOutput', false);
legend(dataStr, 'Location', 'NorthEastOutside');
title(['PER over SNR for APEP sweep, ' num2str(cfgEHT.ChannelBandwidth) ', NTN-TDL-C']);