Hello Praanesh,
I understand that you are attempting to perform 2D CFAR on a radar data cube. However, the computational time required to determine the CUTidx is quite long, and in real-time, the code hangs and fails to run.
I have identified some areas in your code where improvements can be made to enchance its efficiency and potentially resolve the issues.
It appears that you have an issue in your CFAR detector setup, particularly with the 'Rank' parameter. The correction is as follows:
'Rank', floor (Ntc * Ntr * 3/4)
Please ensure that you're using the actual values of `Ntc` and `Ntr` in this calculation, rather than the string length 'TrainingBandSize'.
Additionally, your `cutidx` calculation logic seems sound. However, it may be more efficient to preallocate the array for performance and clarity.
Regards,
Naren