function printResults(run_id, M, Symbols, vnle_pf_package, dbtgt_package, occ) % PRINTRESULTS Prints formatted results from equalization % % Inputs: % run_id - Run identifier % M - PAM level % Symbols - Symbol data with fs property % vnle_pf_package - VNLE+PF results package % dbtgt_package - DB target results package (optional) % occ - Occurrence index % Print header fprintf("==== EQUALIZATION RUN-ID %d | PAM-%d | %.2f GBd ====\n\n", run_id, M, Symbols.fs.*1e-9); % VNLE Results if ~isempty(vnle_pf_package) vnle_result = vnle_pf_package{occ}.resultsVNLE; mlse_result = vnle_pf_package{occ}.resultsMLSE; fprintf(">> VNLE Results:\n"); fprintf(" BER: %.2e\n", vnle_result.BER); fprintf(" BER (pre-code): %.2e\n", vnle_result.BER_precoded); fprintf(" SNR: %.2f dB\n", vnle_result.SNR); fprintf(" GMI: %.4f\n", vnle_result.GMI); fprintf(" Linerate: %.2f Gbps\n", Symbols.fs .* floor(log2(M)*10)/10 .*1e-9); fprintf(" AIR: %.2f Gbps\n", vnle_result.AIR.*1e-9); fprintf("\n"); % MLSE Results fprintf(">> MLSE Results:\n"); fprintf(" BER: %.2e\n", mlse_result.BER); fprintf(" BER (pre-code): %.2e\n", mlse_result.BER_precoded); fprintf(" Channel Alpha: %.2f\n", mlse_result.Alpha); fprintf("\n"); end % DB Target Results if ~isempty(dbtgt_package) dbtgt = dbtgt_package{occ}.resultsDBtgt; fprintf(">> DB Target Results:\n"); fprintf(" BER: %.2e\n", dbtgt.BER); fprintf(" BER (pre-code): %.2e\n", dbtgt.BER_precoded); fprintf("\n"); end fprintf("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n\n"); end