Matlab中遇到的错误,求解救function x=GaussDist(x0,mu,sigma,n)format long;k=1;x=zeros(n,1);u=zeros(12,1);for i=1:n y=-6; for j=1:12 r=MixMOD(x0,10,1); k=0; r(10) while r(10)==0 k=k+1; r(1
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/28 12:36:25
Matlab中遇到的错误,求解救function x=GaussDist(x0,mu,sigma,n)format long;k=1;x=zeros(n,1);u=zeros(12,1);for i=1:n y=-6; for j=1:12 r=MixMOD(x0,10,1); k=0; r(10) while r(10)==0 k=k+1; r(1
Matlab中遇到的错误,求解救
function x=GaussDist(x0,mu,sigma,n)
format long;
k=1;
x=zeros(n,1);
u=zeros(12,1);
for i=1:n
y=-6;
for j=1:12
r=MixMOD(x0,10,1);
k=0;
r(10)
while r(10)==0
k=k+1;
r(10)=power(2,k);
r=MixMOD(r(10),2,1);
end
u(j)=r(10);
x0=u(j);
y=y+u(j);
end
x(i)=mu+sigma*y;
x0=x(i);
end
format short;
错误提示:
Undefined function or method 'MixMOD' for input arguments of type 'doubl
Matlab中遇到的错误,求解救function x=GaussDist(x0,mu,sigma,n)format long;k=1;x=zeros(n,1);u=zeros(12,1);for i=1:n y=-6; for j=1:12 r=MixMOD(x0,10,1); k=0; r(10) while r(10)==0 k=k+1; r(1
可能是函数没有存在工作目录下.
或者你把函数名写错了.