The Path loss using Terrain Integrated Rough Earth Model can be modelled (calculated) using the 'tirempl' function as offered by the 'Antenna Toolbox'.
Please do check if your MATLAB has the toolbox by using the 'ver' command at MATLAB command prompt.
For more information on tirempl function, please check the below mentioned link:
To obtain the TIREM software, you should contact Alion Science. Try the following URL: