matlab中function定义函数,出现自变量未定义错误,是怎么回事?
来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/05/10 06:06:26
matlab中function定义函数,出现自变量未定义错误,是怎么回事?
输入
function [mean,stdev] = stat(x)
%STAT Interesting statistics.
n=length(x);
mean=sum(x)/n;
stdev= sqrt(sum((x - mean).^2)/n);
保存运行之后,命令窗口跳出
Input argument "x" is undefined.
Error in ==> quroot at 3
n=length(x);
是怎么回事?
输入
function [mean,stdev] = stat(x)
%STAT Interesting statistics.
n=length(x);
mean=sum(x)/n;
stdev= sqrt(sum((x - mean).^2)/n);
保存运行之后,命令窗口跳出
Input argument "x" is undefined.
Error in ==> quroot at 3
n=length(x);
是怎么回事?
写好之后不要直接运行,在外边调用,不然相当于你没有给x
matlab中function定义函数,出现自变量未定义错误,是怎么回事?
matlab 中定义函数,如何定义,我每次都会出现这个问题?Error: Function definitions ar
matlab中老是提示函数定义错误,
matlab中变量未定义怎么办
function 在matlab中怎么定义矩阵
matlab中 S函数 显示没有定义变量t是怎么回事
用户定义类型未定义的错误
matlab中function 函数怎么用?
matlab中输入变量‘mu0’未定义.fy,f1定义所在行有错.
Matlab 中如何定义矩阵自变量啊?
matlab,中,一个函数f=x^2+1,怎么表示,是函数,function定义的函数
求大神帮忙用matlab定义一个函数function