function [oscillations_min,oscillations_max]=create_all_extremums_data(y,maximumindexes,minimumindexes,window);

oscillations_max=[];
for i=1:length(maximumindexes)-1
    begin_moment=maximumindexes(i);
    end_moment=maximumindexes(i+1);
    amplitude=max([y(begin_moment),y(end_moment)])-min(y(begin_moment:end_moment));
    period=end_moment-begin_moment;
    oscillations_max=[oscillations_max;begin_moment,amplitude,period];
end


oscillations_min=[];
for i=1:length(minimumindexes)-1
    begin_moment=minimumindexes(i);
    end_moment=minimumindexes(i+1);
    amplitude=min([y(begin_moment),y(end_moment)])-max(y(begin_moment:end_moment));
    period=end_moment-begin_moment;
    oscillations_min=[oscillations_min;begin_moment,amplitude,period];
end


