0001 function display(Thn)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 f=fields(Thn);
0032 ProtoFlag=0;
0033 NumNeuron=0;
0034
0035
0036 for ij=1:prod(size(Thn))
0037 if isempty(Thn(ij).(f{1}))
0038 continue;
0039 end
0040 NumNeuron=NumNeuron+1;
0041 if ProtoFlag==0
0042 ThnTemp=Thn(ij);
0043 ThnFinal=Thn(ij);
0044 ProtoFlag=1;
0045 end
0046 for j=1:length(f)
0047 if ~iscell(Thn(ij).(f{j}))
0048 if Thn(ij).(f{j})~=ThnTemp.(f{j})
0049 ThnFinal.(f{j})='Varies';
0050 end
0051 else
0052 for ik=1:length(Thn(ij).(f{j}))
0053
0054 if ischar(Thn(ij).(f{j}){ik}) && ~strcmp(Thn(ij).(f{j}){ik},ThnTemp.(f{j}){ik})
0055 ThnFinal.(f{j}){ik}='Varies';
0056 elseif Thn(ij).(f{j}){ik}~=ThnTemp.(f{j}){ik}
0057 ThnFinal.(f{j}){ik}='Varies';
0058 end
0059 end
0060 end
0061 end
0062 end
0063
0064
0065 if exist('ThnFinal')
0066
0067 disp(' ');
0068 disp('The Following Aggregate Fields are Defined for the Neuron Array');
0069 disp([' of size [', num2str(size(Thn)), '] with ' num2str(NumNeuron) ' Non-Empty Neuron(s):']);
0070 disp(' ');
0071 Thn=ThnFinal;
0072 for j=1:length(f)
0073 if isempty(Thn.(f{j}))
0074 disp([' ', f{j}, ' is empty']);
0075 continue;
0076 end
0077 if strcmp(f{j},'InitialPhaseMethod')
0078 if isempty(Thn.(f{j}){1})
0079 disp([' ', f{j}, ' is empty']);
0080 continue;
0081 end
0082 if length(Thn.(f{j}))==1
0083 disp([' ', f{j}, ' = ' Thn.(f{j}){1}]);
0084 else
0085 disp([' ', f{j}, ' = ' Thn.(f{j}){1} ' of ' num2str(Thn.(f{j}){2})]);
0086 end
0087 else
0088 if ischar(Thn.(f{j}))
0089 disp([' ', f{j}, ' = ' Thn.(f{j})]);
0090 elseif isnumeric(Thn.(f{j}))
0091 disp([' ', f{j}, ' = ' num2str(Thn.(f{j}))]);
0092 end
0093 end
0094 end
0095 disp(' ');
0096 else
0097
0098 disp(' ');
0099 if prod(size(Thn))==1
0100 disp('The neuron is empty');
0101 else
0102 disp(['The neuron array of size [' num2str(size(Thn)), '] is empty']);
0103 end
0104 disp(' ');
0105 end