matlab函数调用出错,R=30;m=0:R-1;K=1;s=cos(0.075*pi*m);u=rand(1,R)-0.5;x1=s+u;for n=1:500s=cos(0.075*pi*m);K=K+1;y{n}=ensemble_ave(s,R,K);e=MSE(s,y{n});end;subplot(231),plot(s);subplot(232),plot(u);subplot(233),plot(x1);subplot(234),plot(e);subp
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/20 06:04:52
![matlab函数调用出错,R=30;m=0:R-1;K=1;s=cos(0.075*pi*m);u=rand(1,R)-0.5;x1=s+u;for n=1:500s=cos(0.075*pi*m);K=K+1;y{n}=ensemble_ave(s,R,K);e=MSE(s,y{n});end;subplot(231),plot(s);subplot(232),plot(u);subplot(233),plot(x1);subplot(234),plot(e);subp](/uploads/image/z/2709705-57-5.jpg?t=matlab%E5%87%BD%E6%95%B0%E8%B0%83%E7%94%A8%E5%87%BA%E9%94%99%2CR%3D30%3Bm%3D0%3AR-1%3BK%3D1%3Bs%3Dcos%280.075%2Api%2Am%29%3Bu%3Drand%281%2CR%29-0.5%3Bx1%3Ds%2Bu%3Bfor+n%3D1%3A500s%3Dcos%280.075%2Api%2Am%29%3BK%3DK%2B1%3By%7Bn%7D%3Densemble_ave%28s%2CR%2CK%29%3Be%3DMSE%28s%2Cy%7Bn%7D%29%3Bend%3Bsubplot%28231%29%2Cplot%28s%29%3Bsubplot%28232%29%2Cplot%28u%29%3Bsubplot%28233%29%2Cplot%28x1%29%3Bsubplot%28234%29%2Cplot%28e%29%3Bsubp)
matlab函数调用出错,R=30;m=0:R-1;K=1;s=cos(0.075*pi*m);u=rand(1,R)-0.5;x1=s+u;for n=1:500s=cos(0.075*pi*m);K=K+1;y{n}=ensemble_ave(s,R,K);e=MSE(s,y{n});end;subplot(231),plot(s);subplot(232),plot(u);subplot(233),plot(x1);subplot(234),plot(e);subp
matlab函数调用出错,
R=30;
m=0:R-1;K=1;
s=cos(0.075*pi*m);
u=rand(1,R)-0.5;
x1=s+u;
for n=1:500
s=cos(0.075*pi*m);
K=K+1;
y{n}=ensemble_ave(s,R,K);
e=MSE(s,y{n});
end;
subplot(231),plot(s);
subplot(232),plot(u);
subplot(233),plot(x1);
subplot(234),plot(e);
subplot(235),plot(K,e);
function y=ensemble_ave(s,R,K);
z=zeros(1.R);
for N=1:K
u=rand(1,R)-0.5;
y1=s+u;
z=y1+z;
end;
y=y2/K;
function e=MSE(s,R);
d=y-s;
all=sum(d^2,2);
e=all/R;
按enter后出现
Error using ensemble_ave
Too many output arguments.
看哪里错了,感激不尽了.
matlab函数调用出错,R=30;m=0:R-1;K=1;s=cos(0.075*pi*m);u=rand(1,R)-0.5;x1=s+u;for n=1:500s=cos(0.075*pi*m);K=K+1;y{n}=ensemble_ave(s,R,K);e=MSE(s,y{n});end;subplot(231),plot(s);subplot(232),plot(u);subplot(233),plot(x1);subplot(234),plot(e);subp
输出参数和输入参数不对应