标签: matlab function
假设我有一个名为add.m的matlab文件,其代码为
add.m
function x = add(a, a) x = a + b end
我希望能够从matlab命令窗口调用此函数,但是我收到错误Undefined function or variable 'add'.,当我尝试将该函数复制并粘贴到命令窗口时,我得到了错误Function definitions are not permitted in this context.我该如何解决这个问题?
Undefined function or variable 'add'.
Function definitions are not permitted in this context.