函数文件
怎样才能把M文件放到搜索路径上function [mean,stdev] = stat(x)
n = length(x);
mean = sum(x)/n;
stdev = sqrt(sum((x-mean).^2/n));
??? function [mean,stdev] = stat(x)
|
Error: Function definitions are not permitted at the prompt or in scripts.
这个编程错在那里,我想了半天也不能想出,请那位大哥教一下