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/12/26 09:26:24
matlab函数调用出错,R=30;m=0:R-1;K=1;s=cos(0.075*pi*m);u=rand(1,R)-0.5;x1=s+u;forn=1:500s=cos(0.075*pi*m);K

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
输出参数和输入参数不对应