⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 da_sens.m

📁 这是好用的源代码
💻 M
字号:
function s=da_sens(c,data,include_var,output_var,mx,sdx,my,sdy)
%
% Calculates the sensitivity of the model
% to perturbations in the input variables
%

%
% Determine the mean values of the variables
%
n=pcincl(data,include_var,output_var);
n=mean(n);
n=n-mx;
[n2,md,sd2]=mcen(data);
sd2=std(n2);
clear n2,md;


%
% Calculate the normal resonse
%

nr=n*c';
nr=nr.*sdy;
nr=nr+my;

%
% Calculate the resonse for a 10% increase in each variable
%

[D L]=size(n);
for i = 1:L
	nt=n;
	nt(i)=sd2(i)*0.1;
	nr1=nt*c';
	nr1=nr1.*sdy;
	nr1=nr1+my;
	t(i)=abs((nr-nr1)/nr)*100;
end

%
% Now associate each of these results with an actual variable
%
count=1;
[D L]=size(data);
for i = 1 : L
	if include_var(i)==1
		if output_var(i)==0
			s(i)=t(count);
			count=count+1;
		end
	else
		s(i)=0;
	end
end



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -