function [ obj ] = dvaobjekty( obj1, obj2 )
%DVAOBJEKTY Summary of this function goes here
%   Detailed explanation goes here

u{1} = obj1;
u{2} = obj2;

j = size(u{1}, 1); k = length(u{1});
j2 = size(u{2}, 1); k2 = length(u{2});

rozdil_delek = abs(k-k2);
rozdil_vysek = abs(j-j2);

if k > k2
    u{2} = [u{2} zeros(j2, rozdil_delek)];
    k2 = length(u{2});
else
    u{1} = [u{1} zeros(j, rozdil_delek)];
    k = length(u{1});
end

if j > j2
    u{2} = [u{2}; zeros(rozdil_vysek, k2)];
    j2 = size(u{2}, 1);
else
    u{1} = [u{1}; zeros(rozdil_vysek, k)];
    j = size(u{1}, 1);
end

obj = [u{1} zeros(j,1) u{2}];

end

