Update April
This commit is contained in:
@@ -14,6 +14,7 @@ classdef EML
|
||||
bias
|
||||
u_pi
|
||||
randomkey
|
||||
randomstream
|
||||
|
||||
%on instance creation
|
||||
field
|
||||
@@ -49,6 +50,8 @@ classdef EML
|
||||
obj.(fn{l}) = options.(fn{l});
|
||||
end
|
||||
|
||||
obj.randomstream = RandStream('mlfg6331_64','Seed',obj.randomkey);
|
||||
|
||||
obj.field=sqrt(10^(obj.power/10-3)); %dbm to sqrt(mw)
|
||||
|
||||
obj.noisefactor=sqrt(2*pi*obj.linewidth/obj.fsimu);
|
||||
@@ -105,8 +108,9 @@ classdef EML
|
||||
end
|
||||
|
||||
function noi = createPhaseNoise(obj)
|
||||
|
||||
%create random vector
|
||||
noi = randn(obj.signal_len/2,1);
|
||||
noi = randn(obj.randomstream,obj.signal_len,1);
|
||||
|
||||
%scale with noisefactor
|
||||
noi = noi * obj.noisefactor;
|
||||
@@ -114,9 +118,6 @@ classdef EML
|
||||
%cumsum to accumulate noise over time vector
|
||||
noi = cumsum(noi);
|
||||
|
||||
noi = [noi ; flip(noi)];
|
||||
|
||||
|
||||
end
|
||||
|
||||
function modulated_laserfield = externalmodulation(obj,laserfield,electrical_in)
|
||||
|
||||
Reference in New Issue
Block a user