% Input:
% G: Matrix (contains row-wise generators)

% Ouput:
% x: function handle (support function of the zonotope)

% Description:
% Generates support function representation of a zonotope using the
% generators and starting from the initial point

function [x] = calcZonotopeSP(G)
x = @(l) callZonotopeSP(l,G);

function [x] = callZonotopeSP(l,G)
x=0;

for i=1:1:size(G,1)
    if( size(l,2) > 1 )
        l = l';
    end;

x = x + abs(getmatrixrow(G,i)*l);
end;