Add AWGN channel models and route IMDD simulation through them

This commit is contained in:
Silas Oettinghaus
2026-03-26 11:23:07 +01:00
parent d3235a5c9c
commit c135cb76b1
7 changed files with 167 additions and 68 deletions

View File

@@ -26,11 +26,11 @@ classdef Informationsignal < Signal
end
% function pow = power(obj)
%
% pow = mean(abs(obj.signal.^2),"all") ;
%
% end
function pow = power(obj)
pow = mean(abs(obj.signal.^2),"all") ;
end
end

View File

@@ -172,9 +172,9 @@ classdef Signal
hold on;
if isempty(options.color)
plot(t* 1e6, sig(1:length(t)), 'DisplayName', dn, 'LineWidth', 0.1, 'Marker', 'none', 'LineStyle','-', 'MarkerSize', 0.1);
plot(t* 1e6, sig(1:length(t)), 'DisplayName', dn, 'LineWidth', 0.1, 'Marker', '.', 'LineStyle','none', 'MarkerSize', 0.1);
else
plot(t* 1e6, sig(1:length(t)), 'DisplayName', dn, 'LineWidth', 0.1, 'Marker', 'none', 'LineStyle','-', 'MarkerSize', 0.1,'Color',options.color);
plot(t* 1e6, sig(1:length(t)), 'DisplayName', dn, 'LineWidth', 0.1, 'Marker', '.', 'LineStyle','none', 'MarkerSize', 0.1,'Color',options.color);
end
% 2 c)
% - xlabel if not already here: time in readable format (1 ms and not 1e-3 s)