echo off;
clc;
clf;

% Proudy v miste poruchy
PlotXY=Ipor;
PlotX1=[0, real(PlotXY(1)), 0, real(PlotXY(2)), 0, real(PlotXY(3))];
PlotY1=[0, imag(PlotXY(1)), 0, imag(PlotXY(2)), 0, imag(PlotXY(3))];

% Proudy dodavane siti
PlotXY=Is;
PlotX2=[0, real(PlotXY(1)), 0, real(PlotXY(2)), 0, real(PlotXY(3))];
PlotY2=[0, imag(PlotXY(1)), 0, imag(PlotXY(2)), 0, imag(PlotXY(3))];

% Proudy dodavane generatorem
PlotXY=Ig;
PlotX3=[0, real(PlotXY(1)), 0, real(PlotXY(2)), 0, real(PlotXY(3))];
PlotY3=[0, imag(PlotXY(1)), 0, imag(PlotXY(2)), 0, imag(PlotXY(3))];

plot(PlotX1,PlotY1,'b+',PlotX1,PlotY1,'b-', ...
     PlotX2,PlotY2,'r+',PlotX2,PlotY2,'r-', ...
     PlotX3,PlotY3,'g+',PlotX3,PlotY3,'g-');
title('Proudy Ipor, Is a Ig');
xlabel('V poradi modra, cervena, zelena');
grid on;
axis equal;
