function [ F_all, phi_all ] = Synistameni( data )
%Ypologismos synistamenis n-dynamewn

%-----
%Example
% >>data=[4,45;1,60;2,90;3,180;1,270;2,300]
% >>[F,phi]=Synistameni(data)
% F =
%     3.2466
% phi =
%    65.8471 
%-------

F=data(:,1);
phi=data(:,2);

%1st step
Fx=F.*cos(degtorad(phi));
Fy=F.*sin(degtorad(phi));

compass(Fx+i*Fy)

%2nd step
Fx_all=sum(Fx);
Fy_all=sum(Fy);

%3rd step
F_all=abs(Fx_all+Fy_all*i);
phi_all=radtodeg(angle(Fx_all+Fy_all*i));

end

