more from home

This commit is contained in:
silas (home)
2025-03-10 11:49:59 +01:00
parent bc86fa8d98
commit ea8a43b2ae
6 changed files with 83 additions and 26 deletions

View File

@@ -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