halfway merged and pulled?!

This commit is contained in:
Silas Labor Zizou
2025-12-15 15:41:02 +01:00
parent 7d0a634b87
commit b8cecae895
145 changed files with 19835 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
function rop_fec = interp_fec_cross(rops, ber, fec_thr)
if all(~isfinite(ber))
rop_fec = NaN; return;
end
idx = find(ber < fec_thr, 1, 'first');
if isempty(idx) || idx == 1
rop_fec = NaN; return; % no crossing
end
% linear interpolation between the two nearest points
x1 = rops(idx-1); x2 = rops(idx);
y1 = ber(idx-1); y2 = ber(idx);
rop_fec = interp1([y1 y2], [x1 x2], fec_thr, 'linear', NaN);
end