CFARDectector2D Error using fzero: Initial function value must be finite and real.
2 views (last 30 days)
Show older comments
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.
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Detection in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!