How to solve the duplicate function problem?

조회 수: 11 (최근 30일)
pietro
pietro 2017년 11월 27일
댓글: pietro 2017년 11월 27일
Hi all,
I am running a script in Matlab 2017a where a my own function is run. Everything was running fine but lately, I get the following message:
Function with duplicate name "TransmissionLoadDataComputationN"
cannot be defined.
So, I typed:
which -all TransmissionLoadDataComputationN.m
but I get just one result. I searched for a second entry of the function through windows search and there is just one file named TransmissionLoadDataComputationN.m. I have even searched for all the .m files which contains the string: TransmissionLoadDataComputationN and it resulted only two .m files containing this string (the function file and the script file). So, I am pretty sure, there is no duplicate of the function. I have also tried to change the name of the function, restart Matlab and windows, to move the script and the function in another folder but nothing changed.
What should I do to solve the issue?
Thanks
regards
Pietro
  댓글 수: 3
Matt J
Matt J 2017년 11월 27일
Show us the files so we can see how the problematic name is used.
pietro
pietro 2017년 11월 27일
@Fangjun Jiang. The error points to the line of the function declaration.
I have found a previous versione and I discovered the reason. By mistake, I typed an 'f' in the function heading lines.
f%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I do not understand why matlab returned thaterror.
Thanks to all

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by