053 
0054 <span class="comment">%%%%% ARGUMENT CHECKING</span>
0055 <span class="keyword">if</span> (~isfield(spikes, <span class="string">'hierarchy'</span>) || ~isfield(spikes.hierarchy, <span class="string">'interface_energy'</span>))
0056     error(<span class="string">'SS:energy_not_computed'</span>, <span class="string">'An energy matrix must be computed before aggregation.'</span>);
0057 <span class="keyword">elseif</span> (~isfield(spikes, <span class="string">'overcluster'</span>) || ~isfield(spike