FUNCTION REFERENCE

berfit

Fit smooth closed-form curves to empirical BER measurements.

Fit smooth closed-form curves to empirical BER measurements.

Syntax

[fitber,fitprops] = berfit(empEbNo,empBER,fitEbNo,options,fittype)

Empirical vectors have at least four samples; EbNo is strictly ascending in dB and BER is in (0,1]. fitEbNo defaults to empEbNo and must have at least as many points. fittype is 'exp', 'exp+const', 'polyRatio' or 'doubleExp+const'; omission chooses the valid fit with smallest squared log-BER error. options is [] or a scalar struct with Display, MaxFunEvals, MaxIter, TolFun and TolX (also optimset canonical aliases). Fits use linear EbNo internally. fitprops includes fitType, coeffs, sumSqErr, exitState, funcCount and iterations. Without outputs, plots empirical and fitted BER on semilogy; fittype 'all' plots every valid fit.

Example

x=0:.25:2; y=.5*erfc(sqrt(10.^(x/10))); z=berfit(x,y); assert(max(abs(z./y-1))<1e-3);

Differences from MATLAB: Uses bounded local Nelder-Mead with scaled coefficients and independent starting estimates, so selected fits and coefficients can differ from MATLAB. Zero BER observations and unsupported optimizer fields are rejected. Empirical data are limited to 65536 points; invalid/nonmonotone fits return [].

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.