function sliderSVPGA(hObject, eventdata, Empty_Button, Buttons, SVDText, kind, otherSlider, AxesSVD, rbplotsvd)
data = get(Empty_Button,'UserData');

if (isfield(data,'isdata')*(isfield(data,'issvd')) == 1) && (data.isdata*data.issvd == 1)
    sv = round(get(hObject, 'Value'));
    set(hObject, 'Value',sv);
    
    if kind == 0
        set(SVDText(3), 'String', num2str(sv));
        
        svo = get(otherSlider, 'Value');
        if svo < sv
            set(otherSlider, 'Value', sv);
            set(SVDText(5), 'String', num2str(sv));
            svo = sv;
        end
    else
        set(SVDText(5), 'String', num2str(sv));
        
        svo = get(otherSlider, 'Value');
        if svo > sv
            set(otherSlider, 'Value', sv);
            set(SVDText(3), 'String', num2str(sv));
            svo = sv;
        end
    end
    
    i1 = min([sv, svo, size(data.U,2)]);
    i2 = min(max(sv, svo), size(data.U,2));
    
    if get(rbplotsvd(1), 'Value') == 1
        plot(AxesSVD, 1:size(data.D,1), data.U(:,i1:i2), 'Linewidth',2);
        axis(AxesSVD,'tight');
        xlabel(AxesSVD,'time');
    elseif get(rbplotsvd(2), 'Value') == 1
        semilogy(AxesSVD, i1:i2, diag(data.S(i1:i2, i1:i2)),' k-.o', 'Linewidth',2);
        axis(AxesSVD,'tight');
        yl = get(AxesSVD, 'Ylim');
        set(AxesSVD, 'Xlim', [i1-.1, i2+.1], 'Ylim', [0.9, 1.1].*yl);
        xlabel(AxesSVD,'singular values');
    else
        plot(AxesSVD, data.x, data.V(:,i1:i2), 'Linewidth',2);
        axis(AxesSVD,'tight');
        xlabel(AxesSVD,'channel');
    end
end
