function ryssil(xnode,fe,pe)
dokl= 8;
X=[]; Q=[]; M=[]; 
for i= 1:length(xnode)-1
    xL= xnode(i);
    xP= xnode(i+1);
    r= fe(:,i);
    p= pe(i);
    x= linspace(xL,xP,dokl+1);
    X= [X x];
    q= r(1)+p*(x-xL);
    Q= [Q q];
    m= -r(1)*(x-xL) + r(2)-p*(x-xL).^2/2;
    M= [M m];
end

figure (11);
clf
hold on
grid on;
axis ij;
%plot([xnode(1),xnode(1)],1.0*[min(Q),max(Q)],'k')
title('Sila poprzeczna')
%area(X,Q,'FaceColor', [121/255 150/255 1]);
area(X,Q,'FaceColor', [146/255 202/255 93/255]);
plot(xnode, zeros(length(xnode),1),'k.-','linewidth',3,'MarkerSize', 25');
%%axis([-0.2  xnode(end)+0.2  min(Q)-50 max(Q)+50]); dodac!!!!!!
 axis off
if Q(1)>0
    text(X(1),Q(1),num2str(Q(1)),'HorizontalAlignment','left',...
        'VerticalAlignment','top')
else
    text(X(1),Q(1),num2str(-Q(1)),'HorizontalAlignment','left',...
        'VerticalAlignment','bottom')
end
if Q(end)>0
    text(X(end),Q(end),num2str(Q(end)),'HorizontalAlignment','right',...
        'VerticalAlignment','top')
else
    text(X(end),Q(end),num2str(-Q(end)),'HorizontalAlignment','right',...
        'VerticalAlignment','bottom')
end

    
figure (12);
clf
hold on
grid on;
axis ij;
%plot([xnode(1),xnode(1)],1.0*[min(M),max(M)],'k')
title('Moment zginajacy') 
area(X,M,'FaceColor', [1 212/255 103/255]);
plot(xnode, zeros(length(xnode),1),'k.-','linewidth',3,'MarkerSize', 25');
 axis off
%%axis([-0.2  xnode(end)+0.2  min(M)-50 max(M)+50]); dodac !!!!!
if M(1)>0
    text(X(1),M(1),num2str(M(1)),'HorizontalAlignment','left',...
        'VerticalAlignment','top')
else
    text(X(1),M(1),num2str(-M(1)),'HorizontalAlignment','left',...
        'VerticalAlignment','bottom')
end
if M(end)>0
    text(X(end),M(end),num2str(M(end)),'HorizontalAlignment','right',...
        'VerticalAlignment','top')
else
    text(X(end),M(end),num2str(-M(end)),'HorizontalAlignment','right',...
        'VerticalAlignment','bottom')
end

[wmin,nmin]=min(M);
if nmin~=1 && nmin~=length(M)
    text(X(nmin),wmin,num2str(-wmin),'HorizontalAlignment','center',...
        'VerticalAlignment','bottom')
end
 
[wmax,nmax]=max(M);
if nmax~=1 && nmax~=length(M)
    text(X(nmax),wmax,num2str(wmax),'HorizontalAlignment','center',...
        'VerticalAlignment','top')
end
