Hi Farhan,
We confirm that this error occurs using MATLAB R2019a, but not with R2019b or later versions.
The error can be fixed by replacing the problematic line with:
if size(losMap,1) ~= nAnt && size(losMap,2) ~= nUsers && size(losMap,3) ~= nSegmentsTotal
Regards,
Charmae