duobinary cleanup (currently it is a mess)

This commit is contained in:
Silas Oettinghaus
2026-02-23 09:17:26 +01:00
parent c0a0a415a8
commit 18ccaf8c12
9 changed files with 364 additions and 251 deletions

View File

@@ -462,10 +462,19 @@ classdef PAMmapper
end
function [Signal_out] = quantize(obj,Signal_in)
function [Signal_out] = quantize(obj,Signal_in,options)
arguments
obj
Signal_in
options.custom_const = []
end
constellation = obj.get_levels();
constellation = constellation ./ obj.scaling;
if isempty(options.custom_const)
constellation = obj.get_levels();
constellation = constellation ./ obj.scaling;
else
constellation = options.custom_const;
end
issignalclass = 0;
if isa(Signal_in,'Signal')

View File

@@ -7,11 +7,11 @@ classdef Metricstruct
eqParam_id (1,1) double {mustBeNumeric} = NaN
date_of_processing (1,1) datetime = datetime('now')
numBits (1,1) double {mustBeInteger, mustBeNonnegative} = 0
BER (1,1) double {mustBeNumeric, mustBeNonnegative} = 0
numBitErr (1,1) double {mustBeInteger, mustBeNonnegative} = 0
BER_precoded (1,1) double {mustBeNumeric, mustBeNonnegative} = 0
numBitErr_precoded (1,1) double {mustBeInteger, mustBeNonnegative} = 0
numBits (1,1) double = 0
BER (1,1) double = 0
numBitErr (1,1) double = 0
BER_precoded (1,1) double = 0
numBitErr_precoded (1,1) double = 0
SNR (1,1) double {mustBeNumeric} = NaN
SNR_level (:,1) double {mustBeNumeric} = []