a function declaration cannot apper within a script M-file出现这种情况怎么办
提示没有找到函数文件,你把自定义函数function的.m文件跟要运行的主函数放在一个路径里,这样系统能够找到;或者直接把自定义函数写在主函数里