more from home
This commit is contained in:
@@ -117,6 +117,7 @@ classdef PAMsource
|
||||
else
|
||||
s = RandStream('twister','Seed',obj.randkey);
|
||||
for i = 1:log2(obj.M)
|
||||
N = 2^(obj.order-1); %length of prbs
|
||||
bitpattern(:,i) = randi(s,[0 1], N, 1);
|
||||
end
|
||||
end
|
||||
|
||||
@@ -50,7 +50,7 @@ classdef Pulseformer
|
||||
signalclass_in = signalclass_in.logbookentry(lbdesc);
|
||||
|
||||
% write fs to signal
|
||||
signalclass_in.fs = obj.fdac;
|
||||
signalclass_in.fs = obj.fdac .* (obj.fdac./obj.fsym);
|
||||
|
||||
% write to output
|
||||
signalclass_out = signalclass_in;
|
||||
@@ -98,14 +98,14 @@ classdef Pulseformer
|
||||
%Bau das Filter (hier rc)
|
||||
racos_len = obj.pulselength*2;
|
||||
h = rcosdesign(obj.alpha,racos_len,sps,filtertype);
|
||||
h = h./ max(h);
|
||||
% h = h./ max(h);
|
||||
|
||||
if obj.matched
|
||||
h = 1./h;
|
||||
h = conj(fliplr(h));
|
||||
end
|
||||
|
||||
manual_cyclic_convolution = 1;
|
||||
upfirdn_convolution = 0;
|
||||
manual_cyclic_convolution = 0;
|
||||
upfirdn_convolution = 1;
|
||||
|
||||
if manual_cyclic_convolution
|
||||
|
||||
@@ -131,14 +131,13 @@ classdef Pulseformer
|
||||
if upfirdn_convolution
|
||||
|
||||
%Apply Filter using Matlab build in fctn.
|
||||
h = rcosdesign(obj.alpha,racos_len,sps,"normal");
|
||||
h = h./ max(h);
|
||||
|
||||
data_out_ = upfirdn(data_in,h,up,dn);
|
||||
|
||||
%cut signal, which is longer due to fir filter
|
||||
st = round(up/dn*racos_len/2)+1; %we need to cut y_out
|
||||
st = round(up/dn*racos_len/2); %we need to cut y_out
|
||||
en = round(st + (length(data_in)*up/dn));
|
||||
data_out_ = data_out_(st:en);
|
||||
data_out = data_out_(st:en);
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user