Add AWGN channel models and route IMDD simulation through them
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user