da_unisv.m

来自「wang xiao ping 版遗传算法」· M 代码 · 共 39 行

M
39
字号
function [out]=da_unisv(ol_mod_type,ol_scl_opt,ol_meanx,ol_stdx,ol_meany,ol_stdy,ol_minx,ol_maxx,ol_miny,ol_maxy,ol_coefs,ol_poly,ol_filt);
%
% Universal model saver
%
% out=da_unisv(ol_mod_type,	Model type: 1 - Coef based  2-DynLin 3-Dynnl
%		ol_scl_opt,	Scale option:1 - Variance  2 - 0--->1
%		ol_meanx,	Mean of x-block
%		ol_stdx,	std of x-block
%		ol_meany,	mean of y-block
%		ol_stdy,	std of y-block
%		ol_minx,	minimum of x-block
%		ol_maxx,	maximum of x-block
%		ol_miny,	minimum of y-block
%		ol_maxy,	maximum of y-block
%		ol_coefs,	model coefficients
%		ol_poly,	model polynomial powers
%		ol_filt);	model filter constants
%
% Each save model button passes the necessary parameters and blanks
% to this function.
% 
% out = 1 for a succesful save
% out =-1 for a total fuck up
%


[df_name df_path]=uiputfile('*.mat','Saving universal model file:');

if df_path ~= 0
	[D L]=size(df_path);
	df_path=num2str(df_path(:,1:L-1));
	eval(['cd ' df_path]);
	eval(['save ' df_name ' ol_mod_type ol_scl_opt ol_meanx ol_stdx ol_meany ol_stdy ol_minx ol_maxx ol_miny ol_maxy ol_coefs ol_poly ol_filt']);
	out=1;
else
	out=-1;
end

⌨️ 快捷键说明

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