I am doing M.Tech project work in wireless communication to calculate trust value between the nodes in a Cognitive Radio Network community. Will anybody please help me providing formula with an example to calculate either Residual Energy between two nodes in a network or to calculate bandwidth between two nodes in a network. I will try to code in MATLAB then. I would be really thankful to you for your great help. thank you.