function [ max_R,min_R,max_L,min_L] = Ankle_Power(Markers,handles)

b = strfind(Markers.Labels,'LAnklePower'); %vyhledani v Labels cisla sloupce, kde se nachaza pozadovane hodnoty
for i=1:length(b) 
    if b{i}==1
        l=i*3   %nastaveni nove promenne, ktera indexuje cislo sloupce, kde se nachazi pozadovane hodnoty 
    end
end

d=length(Markers.RawData(:,1));%spocitani delky sloupcu
max_L = max(Markers.RawData(1:d/2,l));%vyhledani prvniho maxima
min_L = min(Markers.RawData(d/2:d,l));    %vyhledani druheho maxima         


a = strfind(Markers.Labels,'RAnklePower'); 
for i=1:length(a) 
    if a{i}==1
        r=i*3   %nastaveni nove promenne, ktera indexuje cislo sloupce, kde se nachazi pozadovane hodnoty 
    end        
end


max_R = max(Markers.RawData(1:d/2,r));%vyhledani prvniho maxima
min_R = min(Markers.RawData(d/2:d,r));  %vyhledani druheho maxima         

% vykresleni 2 grafu, popsani os
%figure
%subplot(2,1,1)
plot(handles.axGraphL,Markers.RawData(:,l),'r')
title(handles.axGraphL,'Left Ankle Power')
xlabel(handles.axGraphL,'Samples [N]')
ylabel(handles.axGraphL,'Power [W/kg]')
%hold on
%subplot(2,1,2)
plot(handles.axGraphR, Markers.RawData(:,r),'g')
title(handles.axGraphR,'Right Ankle Power')
xlabel(handles.axGraphR,'Samples [N]')
ylabel(handles.axGraphR,'Power [W/kg]')
%w=[max_L,min_L]
%z=[max_R,min_R]


end

