基于MATLAB的数据处理与统计作图.doc

  1. 1、本文档共16页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
基于MATLAB的数据处理与统计作图

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); [xx,ind]=sort(x); subplot(3,2,1);plot(xx,y(ind),b-.,xx,yy1(ind),r-); subplot(3,2,2);plot(xx,y(ind),b-.,xx,yy2(ind),r-); subplot(3,2,3);plot(xx,y(ind),b-.,xx,yy3(ind),r-); subplot(3,2,4);plot(xx,y(ind),b-.,xx,yy4(ind),r-); subplot(3,2,5);plot(xx,y(ind),b-.,xx,yy5(ind),r-); subplot(3,2,6);plot(xx,y(ind),b-.,xx,yy6(ind),r-); Smoothts函数: x=122+rand(500,4); p=x(:,4); out1=smoothts(p,b,30); out2=smoothts(p,b,100); out3=smoothts(p,g,30); out4=smoothts(p,g,100,100); out5=smoothts(p,e,30); out6=smoothts(p,e,100); subplot(2,2,1);plot(p); subplot(2,2,2);plot(out1,k);hold on;plot(out2,m.); subplot(2,2,3);plot(out3,k);hold on;plot(out4,m.); subplot(2,2,4);plot(out5,k);hold on;plot(out6,m.); Medfilt1函数: x=linspace(0,2*pi,250); y=sin(x)*150; y(ceil(length(x)*rand(2,1)))=3; noise=normrnd(0,15,250,1); y=y+noise; subplot(1,2,1);plot(x,y); yy=medfilt1(y,50); subplot(1,2,2);plot(x,y,r-.); hold on;plot(x,yy,.); 直方图: Hist函数: x=randn(499,1); y=randn(499,3); subplot(3,1,1);hist(x); subplot(3,1,2);hist(x,100); subplot(3,1,3);hist(y,25); Histc函数: x=-3.9:0.1:3.9; y=randn(10000,1); subplot(1,2,1);hist(y,x); n=histc(y,x); c=cumsum(n); subplot(1,2,2);bar(x,c); Histfit函数: r=normrnd(10,1,10,1); histfit(r); h=get(gca,Children); 盒子图: N=1024;x1=normrnd(5,1,N,1); x2=normrnd(6,1,N,1);x=[x1 x2];subplot(2,2,1);sym1=*;notch1=1;boxplot(x,notch1,sym1); subplot(2,2,2);notch2=0;boxplot(x,notch2); x=randn(100,25);subplot(2,1,1);boxplot(x); 误差条图: x=0:pi/10:pi

文档评论(0)

dajuhyy + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档