Can anyone tell me why I am getting this error message while I am trying save a matlab function?
Show older comments
As far as I know, the matlab file has to have the same name as the matlab function. But, I am getting the following error message: Error: File: asynmotor.m Line: 7 Column: 17 Function with duplicate name "asynmotor" cannot be defined.
Answers (1)
Walter Roberson
on 14 Mar 2017
0 votes
When you have a function inside a script (something that requires R2016b or later), then the name of the function cannot be the same as the name of the script.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!