云模型matlab程序

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1.绘制云图

Ex=18

En=2

He=0.2

hold on

for i=1:1000

Enn=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),'*')

end

Ex=48.7

En=9.1

He=0.39

hold on

for i=1:1000

Enn=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),'*')

end

2.求期望、熵及超熵

X1=[51.93 52.51 54.70 43.14 43.85 44.48 44.61 52.08];

Y1=[0.91169241573 0.921875 0.96032303371 0.75737359551 0.76983848315 0.7808988764 0.78318117978 0.9143258427];

m=8;

Ex=mean(X1)

En1=zeros(1,m);

for i=1:m

En1(1,i)=abs(X1(1,i)-Ex)/sqrt(-2*log(Y1(1,i)));

end

En=mean(En1);

He=0;

for i=1:m

He=He+(En1(1,i)-En)^2;

end

En=mean(En1)

He=sqrt(He/(m-1))

3.平顶山so2环境:

X1=[0.013 0.04 0.054 0.065 0.07 0.067 0.058 0.055 0.045];

Y1=[0.175675676 0.540540541 0.72972973 0.878378378

0.945945946 0.905405405 0.783783784 0.743243243 0.608108108]; m=9;

Ex=mean(X1)

En1=zeros(1,m);

for i=1:m

En1(1,i)=abs(X1(1,i)-Ex)/sqrt(-2*log(Y1(1,i)));

end

En=mean(En1);

He=0;

for i=1:m

He=He+(En1(1,i)-En)^2;

end

En=mean(En1)

He=sqrt(He/(m-1))

1.绘制正向云图

Ex=18

En=2

He=0.2

hold on

for i=1:1000

Enn=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),'*')

end

Ex=48.7

En=9.1

He=0.39

hold on

for i=1:1000

Enn=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),'*')

end

2.逆向云发生器中需要剔除隶属度大于0. 9999 的云滴,剩

下个云滴。代码如下:

x=[51.93,52.51,54.7,56.96,43.14,43.85,44.48,44.61,52.08];

6983848315,0.7808988764,0.78318117978,0.9143258427];

X1=x;

Y1=y;

i=1;n=9;flag=0;m=0;

while i<=(n-flag)

if Y1(1,i)>0.9999

Y1(:,i)=[];

X1(:,i)=[];

flag=flag+1;

else

i=i+1;

m=m+1;

end

end

m

X1

Y1

输出:

m=8

X1=[51.93 52.51 54.70 43.14 43.85 44.48 44.61 52.08];%除以去掉的56.96得到Y1,云模型在水资源供求预测中的应用

0.76983848315 0.7808988764 0.78318117978 0.9143258427];%确定度或者隶属度

求期望、熵及超熵

X1=[51.93 52.51 54.70 43.14 43.85 44.48 44.61 52.08];%除以去掉的56.96得到Y1,云模型在水资源供求预测中的应用

Y1=[0.91169241573 0.921875 0.96032303371 0.75737359551 0.76983848315 0.7808988764 0.78318117978 0.9143258427];%确定度或者隶属度

m=8;

Ex=mean(X1)

En1=zeros(1,m);

for i=1:m

En1(1,i)=abs(X1(1,i)-Ex)/sqrt(-2*log(Y1(1,i)));

end

En=mean(En1);

He=0;

for i=1:m

He=He+(En1(1,i)-En)^2;

end

En=mean(En1)

相关文档
最新文档