function variances=waveform_segmental_variance(idx, templates, selected_events)
%

for i=1:max(idx) %max of idx is equal to the number of clusters
    active_cluster=find(idx==i);
    for j=1:length(active_cluster)
        
    end
    
end