MATLAB: The attenuation due to rainfall calculated by function “rainpl” is different from ITU-R.838

Phased Array System Toolboxrainpl

the help of "rainpl" says:To compute the total attenuation for narrowband signals along a path, the function multiplies the specific attenuation by the path length R. Then, total attenuation is Lr = Rγr. but when i test this by code:
tau=0;
elev = 30;
freq = 11.0e9;
rng = [1:1000]*1e3;
rr = 10.0;
L = rainpl(rng,freq,rr,elev,tau)
plot([1:1000],L)
grid
xlabel('range(km)')
ylabel('Attenuation (dB)')
since the γr is fixed,it seems that the Attenuation isn't linear function of the the path length.is there anything i ignored?
i also test this with software p.838 on ITU software. And i get quite different result. so i am confused about to trust which one?

Best Answer

The plot you see is in dB scale, that's why it does not look like a linear model, but it is indeed linear.
I'm not familiar with the ITU software but as the documentation indicates, the function is based on ITU-R P.838-3, so it could be different to the original P.838 if that's what the software is based on. I did try compute values mentioned in P.838-3 using the function and was able to get the matching result.
HTH