今天使用roots()结果出现错误:
??? Attempt to execute SCRIPT roots as a function.
Error in ==> roots at 3
r = roots( p )
心想难道我的matlab不能识别roots函数?后来上网搜了之后才发现,
Attempt to execute SCRIPT *** as a function
是因为:
在系统中,现有的.m文件有的与***函数重名,所以matlab编译器不知道在遇到***的时候到底该执行哪一个函数。
而我已经在文件中命名了一个叫做roots.m的文件,因此无法执行。
转载于:https://blog.51cto.com/enjoymcu/1032163