《绘制云模型matlab程序.docx》由会员分享,可在线阅读,更多相关《绘制云模型matlab程序.docx(7页珍藏版)》请在课桌文档上搜索。
1、L绘制云图Ex=18En=2He=O.2holdonfori=l:1000Enn=randn(1)*He+En;x(i)=randn(1)*Enn+Ex;y(i)=exp(-(x(i)-EX12/(2*Em2);plot(x(i),y(i),*)endEx=48.7En=9.1He=O.39holdonfori=l:1000Enn=randn(1)*He+En;x(i)=randn(1)*Enn+Ex;y(i)=exp(-(x(i)-Ex)2/(2*Enn2);plot(x(i),y(i),*)end2 .求期望、牖及超端Xl=51.9352.5154.7043.1443.8544.4844.
2、6152.08;Yl=0.91169241573O.921875O.96032303371O.75737359551O.76983848315O.7808988764O.78318117978O.9143258427;m=8;Ex=mean(Xl)Enl=zeros(1,m);fori=l:mEnl(1,i)=abs(Xl(1,i)-Ex)sqrt(-2*log(Yl(1,i);endEn=mean(Enl);He=O;fori=l:mHe=He+(Enl(1,i)-En)2;endEn=mean(Enl)He=sqrt(He/(m-l)3 .平顶山so2环境:Xl=0.0130.040.05
3、40.0650.070.0670.0580.0550.045;Yl=0.1756756760.5405405410.729729730.8783783780.9459459460.9054054050.7837837840.7432432430.608108108;m=9;Ex=mean(Xl)Enlzzzeros(1,m);fori=l:mEnl(1,i)=abs(Xl(l,i)-Ex)sqrt(-2*log(Yl(1,i);endEn=mean(Enl);He=O;fori=l:mHe=He+(Enl(1,i)-En)2;endEn=mean(Enl)He=sqrt(He/(m-l)1.绘
4、制正向云图Ex=18En=2He=O.2holdonfor1=1:1000Enn=randn(1)*He+En;x(i)=randn(1)*Enn+Ex;y(i)=exp(-(x(i)-EX12/(2*Emf2);plot(x(i),y(i),*)Ex=48.7En=9.1He=O.39holdonfor1=1:1000Enn=randn(1)*He+En;x(i)=randn(1)*Enn+Ex;y(i)=exp(-(x(i)-Ex12/(2*Emf2);plot(x(i),y(i),*)end2.逆向云发生器中需要剔除隶属度大于0.9999的云滴,剩下个云滴。代码如下:x=51.93,52
5、.51,54.7,56.96,43.14,43.85,44.48,44.61,52.08;y=0.91169241573,0.921875,0.96032303371,1,0.75737359551,0.76983848315,0.7808988764,0.78318117978,0.9143258427;Xl=x;Yl=y;i=l;n=9;flag=0;m=0;whilei0.9999Yl(,i)=;Xl(:,i)=口;flag=flag+l;elsei=i+l;m=m+l;endendmXlYl输出:m=8Xl=51.9352.5154.7043.1443.8544.4844.6152.0
6、8;%除以去掉的56.96得到Yl,云模型在水资源供求预测中的应用Yl=0.911692415730.9218750.960323033710.757373595510.769838483150.78089887640.783181179780.9143258427;%确定度或者隶属度求期望、燧及超爆Xl=51.9352.5154.7043.1443.8544.4844.6152.08;%除以去掉的56.96得到Yl,云模型在水资源供求预测中的应用Yl=0.911692415730.9218750.960323033710.757373595510.769838483150.78089887640.783181179780.9143258427;%确定度或者隶属度m=8;Ex=mean(Xl)Enl=zeros(1,m);fori=l:mEnl(1,i)=abs(Xl(1,i)-Ex)sqrt(-2*log(Yl(1,i);endEn=mean(Enl);He=O;fori=l:mHe=He+(Enl(1,i)-En)2;endEn=mean(Enl)He=sqrt(He/(m-l)