% Sum up the forces and visualize

% Example on quiver
clear;
clc;

% User input
Fs = [2 2; 1 -3; 2 0; 2 -1.5];
F  = sum(Fs, 1) % resulting force

%% Graphical output
Z = zeros(size(Fs, 1), 1);

figure('color', 'w');
quiver(Z, Z, Fs(:,1), Fs(:,2), 0, ...
    'LineWidth', 1.5, 'Color', 'b');
hold on; % allows to have more graphs in a figure
quiver(0, 0, F(1), F(2), 0, ...
    'LineWidth', 2, 'Color', 'r');
grid on; % enable grid
% add labels (LaTeX interpreter possible)
option = {'Interpreter', 'LaTeX', 'FontSize', 14};
xlabel('$F_x$', option{:});
ylabel('$F_y$', option{:});