您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 其它文档 > 云模型matlab程序
1.绘制云图Ex=18En=2He=0.2holdonfori=1:1000Enn=randn(1)*He+En;x(i)=randn(1)*Enn+Ex;y(i)=exp(-(x(i)-Ex)^2/(2*Enn^2));plot(x(i),y(i),'*')endEx=48.7En=9.1He=0.39holdonfori=1:1000Enn=randn(1)*He+En;x(i)=randn(1)*Enn+Ex;y(i)=exp(-(x(i)-Ex)^2/(2*Enn^2));plot(x(i),y(i),'*')end2.求期望、熵及超熵X1=[51.9352.5154.7043.1443.8544.4844.6152.08];Y1=[0.911692415730.9218750.960323033710.757373595510.769838483150.78089887640.783181179780.9143258427];m=8;Ex=mean(X1)En1=zeros(1,m);fori=1:mEn1(1,i)=abs(X1(1,i)-Ex)/sqrt(-2*log(Y1(1,i)));endEn=mean(En1);He=0;fori=1:mHe=He+(En1(1,i)-En)^2;endEn=mean(En1)He=sqrt(He/(m-1))3.平顶山so2环境:X1=[0.0130.040.0540.0650.070.0670.0580.0550.045];Y1=[0.1756756760.5405405410.729729730.8783783780.9459459460.9054054050.7837837840.7432432430.608108108];m=9;Ex=mean(X1)En1=zeros(1,m);fori=1:mEn1(1,i)=abs(X1(1,i)-Ex)/sqrt(-2*log(Y1(1,i)));endEn=mean(En1);He=0;fori=1:mHe=He+(En1(1,i)-En)^2;endEn=mean(En1)He=sqrt(He/(m-1))1.绘制正向云图Ex=18En=2He=0.2holdonfori=1:1000Enn=randn(1)*He+En;x(i)=randn(1)*Enn+Ex;y(i)=exp(-(x(i)-Ex)^2/(2*Enn^2));plot(x(i),y(i),'*')endEx=48.7En=9.1He=0.39holdonfori=1:1000Enn=randn(1)*He+En;x(i)=randn(1)*Enn+Ex;y(i)=exp(-(x(i)-Ex)^2/(2*Enn^2));plot(x(i),y(i),'*')end2.逆向云发生器中需要剔除隶属度大于0.9999的云滴,剩下个云滴。代码如下:x=[51.93,52.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];X1=x;Y1=y;i=1;n=9;flag=0;m=0;whilei=(n-flag)ifY1(1,i)0.9999Y1(:,i)=[];X1(:,i)=[];flag=flag+1;elsei=i+1;m=m+1;endendmX1Y1输出:m=8X1=[51.9352.5154.7043.1443.8544.4844.6152.08];%除以去掉的56.96得到Y1,云模型在水资源供求预测中的应用Y1=[0.911692415730.9218750.960323033710.757373595510.769838483150.78089887640.783181179780.9143258427];%确定度或者隶属度求期望、熵及超熵X1=[51.9352.5154.7043.1443.8544.4844.6152.08];%除以去掉的56.96得到Y1,云模型在水资源供求预测中的应用Y1=[0.911692415730.9218750.960323033710.757373595510.769838483150.78089887640.783181179780.9143258427];%确定度或者隶属度m=8;Ex=mean(X1)En1=zeros(1,m);fori=1:mEn1(1,i)=abs(X1(1,i)-Ex)/sqrt(-2*log(Y1(1,i)));endEn=mean(En1);He=0;fori=1:mHe=He+(En1(1,i)-En)^2;endEn=mean(En1)He=sqrt(He/(m-1))
本文标题:云模型matlab程序
链接地址:https://www.777doc.com/doc-1799579 .html