I am looking for LEACH-C protocol source code in MATLAB ?

can any one help me in getting the source code of LEACH_C protcol

댓글 수: 2

Hello, have you been able to find the leach-c matlab code since then ? Thank u
Please I need t the code of TL-Leach in matlab for my project can anyone help me please

댓글을 달려면 로그인하십시오.

답변 (1개)

Sanskar Garg
Sanskar Garg 2020년 11월 25일

0 개 추천

Hope this helps.

댓글 수: 4

Please I need the code of TL-Leach in matlab for my project can you help me please
The paper https://iopscience.iop.org/article/10.1088/1757-899X/1010/1/012014/pdf indicates that they ran tl-leach simulations in MATLAB. You could write to the authors and ask if they will make their code available.
hello , when i execute this code it give me this error :
Unrecognized field name "E".
Error in LEACH_C (line 58)
if (S(i).E<=0)
The code expects that it will have a struct passed into the function.
The struct is expected to have fields named
  • cl -- zero assigned to sometimes, but not used for anything
  • E -- energy, must be set for sure
  • G -- unknown purpose, set to 0 and to 19
  • min_dis -- minimum distance to something
  • min_dis_cluster -- cluster that the point is a minimum distance to
  • type -- 'C' or 'N' -- unknown purpose
  • xd -- x position, must be set for sure
  • yd -- y position, must be set for sure
Possibly some of those do not need to be initialized, as some of the fields are perhaps always set before use, but it is not obvious that will be the case, as the initializations of the fields is done conditionally. Safer to assume that you need to initialize all of the fields I noted.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

질문:

2016년 9월 12일

댓글:

2022년 10월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by