Hi Hassan,
It looks like there's a solution that addresses your query. Please refer to this MATLAB Answer to implement packet calculation for WSNs: https://github.com/cesarfgs/matlab-wsn-code
I hope this resource helps with your question!
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!