在matlab中m文件下,只要声明函数就报错,怎么回事 Function definitions

在matlab中m文件下,只要声明函数就报错,怎么回事
Function definitions are not permitted at the prompt or in scripts

function要在第一行声明,或者只能在别的函数后,不能在主程序中
温馨提示:答案为网友推荐,仅供参考
相似回答