统计计算作业: 自己根据qqplot方法设计一个myqqplot function h = myqqplot(x) y = sort(x); [m,n]=size(y); pp=((1:n)'-0.5)./n; x = norminv(pp); hh = plot(x,y,'-p'); x=x'; r=corrcoef(y,x); b=r(1,2); text(0.8*(min(x)+max(x)),0.8*(min(y)+max(y)),['r=' num2str(b)]); xlabel('Standard NormalQuantiles') ylabel('Quantiles of InputSample') title ('QQ Plot of Sample Dataversus Standard Normal')
|