Minor changes from Star PC.
Better plot in channel freq response imdd_mpi simulation is a good 400G model DSP offline analysis script
This commit is contained in:
@@ -293,7 +293,7 @@ classdef PAMmapper
|
||||
end
|
||||
|
||||
function [out] = separate_pamlevels(obj,data_in)
|
||||
|
||||
%data_in is Signal class
|
||||
%A) normally return the preproduct of the decision
|
||||
a = squeeze(repmat(real(data_in.signal),[1 1 length(obj.thresholds)])); %Eingangssignal in 3 spalten
|
||||
b = squeeze(repmat(reshape(obj.thresholds(:).',[1 1 length(obj.thresholds)]),[1 length(data_in.signal) 1])); %Threshold in 3 Spalten
|
||||
@@ -308,6 +308,18 @@ classdef PAMmapper
|
||||
|
||||
end
|
||||
|
||||
function [Signal_out] = quantize(obj,Signal_in)
|
||||
constellation = obj.get_levels();
|
||||
constellation = constellation ./ rms(constellation);
|
||||
Signal_out = Signal_in;
|
||||
dist = abs(Signal_in.signal - constellation);
|
||||
[~,symbol_idx] = min(dist,[],2); % decision for closest constellation point
|
||||
Signal_out.signal = constellation(symbol_idx);
|
||||
|
||||
Signal_out.signal = reshape(Signal_out.signal,size(Signal_in.signal));
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user