鉴于MATLAB的数据办理与统计作图纲要
鉴于MATLAB的数据办理与统计作图纲要
1/16
鉴于MATLAB的数据办理与统计作图纲要
Smooth函数:
;
c=smooth(ubplot(1,2,1);plot(x,y);
yy=medfilt1(y,50);
subplot(1,2,2);plot(x,y,'r-.');
holdon;plot(x,yy,'.');
鉴于MATLAB的数据办理与统计作图纲要
鉴于MATLAB的数据办理与统计作图纲要
3/16
鉴于MATLAB的数据办理与统计作图纲要
直方图:
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);
鉴于MATLAB的数据办理与统计作图纲要
鉴于MATLAB的数据办理与统计作图纲要
4/16
鉴于MATLAB的数据办理与统计作图纲要
Histc函数:
x=-::;
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');
鉴于MATLAB的数据办理与统计作图纲要
鉴于MATLAB的数据办理与统计作图纲要
5/16
鉴于MATLAB的数据办理与统计作图纲要
盒子图:
N=1024;x1=normrnd(5,1,N,1);
x2=normrnd(6,1,N,1);x=[x1x2];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);
鉴于MATLAB的数据办理与统计作图纲要
鉴于MATLAB的数据办理与统计作图纲要
6/16
鉴于MATLAB的数据办理与统计作图纲要
偏差条图:
x=0:pi/10:pi;
y=sin(x);
e=std(y)*ones(size(x));
errorbar(x,y,e)
最小二乘法拟合直线:
x=1:10;
y1=x+rand(1,10);
scatter(x,y1,25,'b','*')
holdon;
y2=2*x+randn(1,10);
plot(x,y2,'mo')
y3=3*x+randn(1,10);
plot(x,y3,'rx:');
y4=4*x+randn(1,10);
plot(x,y4,'g+--');
鉴于MATLAB的数据办理与统计作图纲要
鉴于MATLAB的数据办理与统计作图纲要
7/16
鉴于MATLAB的数据办理与统计作图纲要
基于MATLAB数据处理与统计作图概要 来自淘豆网www.taodocs.com转载请标明出处.