clear;
clc
W=importdata('0.1.txt');
%一号阀
for i=2:65
coe1(:,i-1)=W(:,i)/(1/2*1.225*7.76^2);
coe1_mean(i-1)=mean(coe1(:,i-1));
coe1_rms(i-1)=std(coe1(:,i-1));
end;
%二号阀
for j=2:65
coe2(:,j-1)=W(:,j+64)/(1/2*1.225*7.76^2);
coe2_mean(j-1)=mean(coe2(:,j-1));
coe2_rms(j-1)=std(coe2(:,j-1));
end;
%三号阀
for k=2:65
coe3(:,k-1)=W(:,k+128)/(1/2*1.225*7.76^2);
coe3_mean(k-1)=mean(coe3(:,k-1));
coe3_rms(k-1)=std(coe3(:,k-1));
end;
%四号阀
for m=2:65
coe4(:,m-1)=W(:,m+192)/(1/2*1.225*7.76^2);
coe4_mean(m-1)=mean(coe4(:,m-1));
coe4_rms(m-1)=std(coe4(:,m-1));
end;
%五号阀
for n=2:65
coe5(:,n-1)=W(:,n+256)/(1/2*1.225*7.76^2);
coe5_mean(n-1)=mean(coe5(:,n-1));
coe5_rms(n-1)=std(coe5(:,n-1));
end;
%汇总
fyxs=[coe1 coe2 coe3 coe4 coe5];
fymean=[coe1_mean coe2_mean coe3_mean coe4_mean coe5_mean];
fyrms=[coe1_rms coe2_rms coe3_rms coe4_rms coe5_rms];
load('duiy.txt');
for i=1:250
fyxslast(:,i)=fyxs(:,duiy(i));
fymeanlast(i,:)=fymean(:,duiy(i))';
fyrmslast(i,:)=fyrms(:,duiy(i))';
end
fymean_1=fymeanlast(1:50,:);
fymean_2=fymeanlast(51:100,:);
fymean_3=fymeanlast(101:150,:);
fymean_4=fymeanlast(151:200,:);
fymean_5=fymeanlast(201:250,:);
fystd_1=fyrmslast(1:50,:);
fystd_2=fyrmslast(51:100,:);
fystd_3=fyrmslast(101:150,:);
fystd_4=fyrmslast(151:200,:);
fystd_5=fyrmslast(201:250,:);
data1=[fymean_1,fymean_2,fymean_3,fymean_4,fymean_5];
data2=[fystd_1,fystd_2,fystd_3,fystd_4,fystd_5];
t=1:50;
figure(1)
plot(t,data1(:,1),'ko')
hold on
plot(t,data1(:,2),'yo')
hold on
plot(t,data1(:,3),'ro')
hold on
plot(t,data1(:,4),'bo')
hold on
plot(t,data1(:,5),'mo')
legend('条带1','条带2','条带3','条带4','条带5')
figure(2)
plot(t,data2(:,1),'ko')
hold on
plot(t,data2(:,2),'yo')
hold on
plot(t,data2(:,3),'ro')
hold on
plot(t,data2(:,4),'bo')
hold on
plot(t,data2(:,5),'mo')
legend('条带1','条带2','条带3','条带4','条带5')
xlswrite('pressure_data(mean).xls',data1,'平均风压系数','A1');
xlswrite('pressure_data(std).xls',data2,'脉动风压系数','A1');
display('jieshu')