Why do I get this error since there is only one function?
1 view (last 30 days)
Stelios Fanourakis on 20 Jun 2019
I get the below error
Error: File: SegmentBone.m Line: 7 Column: 18
Function with duplicate name "SegmentBone" cannot be defined.
If I use
It will give me the correct function "SegmentBone.m" in the working folder. There is no other function having exactly the same name. There are other functions with the name "SegmentBoneDP.mexmaci64" for instance or "SegmentBoneDP.cpp"
But their names are not identical. Thus, they are considered different names. Why do I get the error then?
Walter Roberson on 20 Jun 2019
This happens when a script file with that name contains a function definition with the same name. Which can also happen in what you thought was just a function definition file if you accidentally put commands before the function, such as accidental typing or such as a clc or clear statement.