Closed asolsonaberga closed 5 years ago
This is how I managed for the ICIgrams for sperm whales. I will look at this and see if I can make it work if all the plots are in one big figure
%%%%%%%%%%%%% class defined manually by user %%%%%%%%%%%%%%%%%% % get key stroke brush on h = brush;
w = waitforbuttonpress; % wait for user input.
disp('Press key or brush points + press key')
key = get(gcf,'CurrentCharacter');
if w == 0
% detections were flagged by user
w = waitforbuttonpress;
key = get(gcf,'CurrentCharacter');
% get brushed data and figure out what to do based on color:
class = brush_selection(hPoints,key,class);
disp(['Session',num2str(m),' Class selected: ', key])
disp('Select other class or go to next window')
run = 0;
else
if strcmp(key,'f') % All points to class: female
pointsDet = ~isnan(groupscores.Class);
pointsDet = sum(pointsDet,2);
index = find(pointsDet > 0);
class.Female(index) = 1;
disp(['Session',num2str(m),' All Female Detections = ',num2str(nansum(class.Female))])
m = m + 1;
run = 1;
elseif strcmp(key,'j') % All points to class: juvenile
pointsDet = ~isnan(groupscores.Class);
pointsDet = sum(pointsDet,2);
index = find(pointsDet > 0);
class.Juvenile(index) = 1;
disp(['Session',num2str(m),' All Juvenile Detections = ',num2str(nansum(class.Juvenile))])
m = m + 1;
run = 1;
........ brush_selection.txt
Explore different possibilities to make the brush work on matlab versions after 2014.