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/08/15 12:50: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](/uploads/image/z/7000364-20-4.jpg?t=Matlab%E4%B8%AD%E9%81%87%E5%88%B0%E7%9A%84%E9%94%99%E8%AF%AF%2C%E6%B1%82%E8%A7%A3%E6%95%91function+x%3DGaussDist%28x0%2Cmu%2Csigma%2Cn%29format+long%3Bk%3D1%3Bx%3Dzeros%28n%2C1%29%3Bu%3Dzeros%2812%2C1%29%3Bfor+i%3D1%3An++++y%3D-6%3B++++for+j%3D1%3A12++++++++r%3DMixMOD%28x0%2C10%2C1%29%3B++++++++k%3D0%3B++++++++r%2810%29++++++++while+r%2810%29%3D%3D0++++++++++++k%3Dk%2B1%3B++++++++++++r%281)
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
可能是函数没有存在工作目录下.
或者你把函数名写错了.