function save_config_hook;

params = get(gcf,'UserData');

[config_file,path_name]=uiputfile('*.m','Choose a name for the configuration file...');
if config_file~=0,

	if ~strcmp(config_file(end-1:end),'.m'),
		config_file = [config_file '.m'];
	end
	
	fid = fopen(config_file,'w');
	
	fprintf(fid,['params.data = ' any2str(params.data) ';\n']);
	fprintf(fid,['params.input = ' any2str(params.input) ';\n']);
	fprintf(fid,['params.output = ' any2str(params.output) ';\n']);
	fprintf(fid,['params.ny = ' any2str(params.ny) ';\n']);
	fprintf(fid,['params.nu = ' any2str(params.nu) ';\n']);
	fprintf(fid,['params.nd = ' any2str(params.nd) ';\n']);
	fprintf(fid,['params.method = ' any2str(params.method) ';\n']);
	fprintf(fid,['params.ident_params = ' any2str(params.ident_params) ';\n']);
	fprintf(fid,['params.xval_data = ' any2str(params.xval_data) ';\n']);
	fprintf(fid,['params.visual_params = ' any2str(params.visual_params) ';\n']);

	fclose(fid);
		
end
