From f954b43594c3496aff6a171f3193dd563ac7ed03 Mon Sep 17 00:00:00 2001 From: L_DelOff <51275636+LDelOff@users.noreply.github.com> Date: Wed, 16 Jun 2021 23:27:33 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=B0=D0=BD=D0=B0=D0=BB=D0=B8=D0=B7=20=D0=B2=D0=B5?= =?UTF-8?q?=D0=BB=D0=B8=D1=87=D0=B8=D0=BD=D1=8B=20=D0=BE=D1=82=D0=BA=D0=BB?= =?UTF-8?q?=D0=BE=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D0=B0=D1=80=D0=B0?= =?UTF-8?q?=D0=BC=D0=B5=D1=82=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- analysis.m | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/analysis.m b/analysis.m index 27bfe2a..458e416 100644 --- a/analysis.m +++ b/analysis.m @@ -76,10 +76,35 @@ for i=1:length(param.dates) report.data(num).EP_Etemp(i)=mymean(Etemp,1e10); end +report.data(num).RPA_HHeden_lim=mylim(report.data(num).RPA_HHeden,param); +report.data(num).RPA_O2den_lim=mylim(report.data(num).RPA_O2den,param); +report.data(num).EP_Eden_lim=mylim(report.data(num).EP_Eden,param); +report.data(num).EP_Etemp_lim=mylim(report.data(num).EP_Etemp,param); + + param.report=report; save(fname_rep,'report'); end +function out=mylim(y,param) +Q1=quantile(y,0.25); +Q2=quantile(y,0.5); +Q3=quantile(y,0.75); +L1=Q2-param.k*(Q3-Q1); +L2=Q2+param.k*(Q3-Q1); + +out=[]; +for i=1:length(y) + if (y(i)<=L1)||(y(i)>=L2)&&(isnan(y(i))) + out(i)=(y(i)-Q2)*100/(L1-Q2);% отклонение в процентах + %out(i)=1; + else + out(i)=0; + end +end +end + + function num=give_number(report,f,R) flag=0; % Проверяет, есть ли в отчете данные со спутника f [~,b]=size(report.data);