CFARDectector2D Error using fzero: Initial function value must be finite and real.

2 ビュー (過去 30 日間)
Hi,
I am trying to create a CFAR range Doppler map for FMCW radar.
Offending code:
cutidx = [];
for m = 1:n_sweeps
for n = 1:n_samples
cutidx = [cutidx,[n;m]];
end
end
ncutcells = size(cutidx,2)
[up_detections, upth] = CFAR(abs(fftshift(IQ2D)), cutidx);
My 2D FFT result is IQ2D, dimensions 200 samples x 512 sweeps. I set up the cutidx as shown in the example. Transposing the input has no effect on the error:
Error using fzero
Initial function value must be finite and real.
Error in phased.internal.AbstractDetector/calcWGNThresholdFactor (line 353)
alpha = abs(fzero(@(x)SOCAWGNThresholdFactor(abs(x)),cast(CAThreshold,'double')));
Error in phased.internal.AbstractDetector/setupImpl (line 216)
obj.pFactor = calcWGNThresholdFactor(obj);
Error in phased.CFARDetector2D/setupImpl (line 243)
setupImpl@phased.internal.AbstractDetector(obj);
Error in cfar_rd_sawtooth (line 80)
[up_detections, upth] = CFAR(abs(fftshift(IQ2D)), cutidx);
Please find script and data attached.

採用された回答

Dayalan Nair
Dayalan Nair 2022 年 7 月 5 日
The issue was that the cells under test must be training + guard cells away from the edges of the data set

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDetection についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by