mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
332 B
Matlab
19 lines
332 B
Matlab
function [ sfo sfo_v ] = srslte_sfo_estimate( fs, T )
|
|
|
|
|
|
nanfs=fs(~isnan(fs));
|
|
idx=find(~isnan(fs));
|
|
sfo_v = zeros(length(nanfs)-1,1);
|
|
for i=2:length(nanfs)
|
|
if (abs(nanfs(i)-nanfs(i-1))<9000)
|
|
sfo_v(i-1)=(nanfs(i)-nanfs(i-1))/T/(idx(i)-idx(i-1));
|
|
else
|
|
sfo_v(i-1)=sfo_v(i-2);
|
|
end
|
|
end
|
|
|
|
sfo = mean(sfo_v);
|
|
|
|
|
|
|