0001
0002
0003
0004
0005
0006
0007 if ~evalin('base','~isempty(whos(''global'',''THERING''))')
0008 error('Global variable THERING could not be found');
0009 end
0010
0011 if ~evalin('base','exist(''THERING'')')
0012 global THERING
0013 end
0014
0015 localcavindex = findcells(THERING,'Frequency');
0016
0017 if isempty(localcavindex)
0018 disp('No cavities were found in the lattice');
0019 end
0020
0021
0022 for ii = localcavindex
0023 if THERING{ii}.Length == 0;
0024 THERING{ii}.PassMethod = 'IdentityPass';
0025 else
0026 THERING{ii}.PassMethod = 'DriftPass';
0027 end
0028 end
0029
0030 disp(strcat('Cavities located at index [',num2str(localcavindex), '] were turned OFF'))
0031 clear ii localcavindex