Smooth函数:
load count.dat;
c=smooth(count(:));
C1=reshape(c,24,3);
subplot(3,1,1);plot(count,':');
hold on;
plot(C1,'-');
C2=zeros(24,3);
for I=1:3
C2(:,I)=smooth(count(:,I));
end;
subplot(3,1,2);plot(count,':');hold on; plot(C2,'-');
subplot(3,1,3);plot(C2-C1,'o-');
>> x=15*rand(150,1);
y=sin(x)+0.5*(rand(size(x))-0.5);
y(ceil(length(x)*rand(2,1)))=3; noise=normrnd(0,15,150,1);
y=y+noise;
>> yy1=smooth(x,y,0.1,'loess'); >> yy2=smooth(x,y,0.1,'rloess'); >> yy3=smooth(x,y,0.1,'moving'); >> yy4=smooth(x,y,0.1,'lowess'); >> yy5=smooth(x,y,0.1,'sgolay'); >> yy6=smooth(x,y,0.1,'rlowess');