function target = sappend(target, source)
% target = sappend(target, source)
%
% appends source to target
% target = [] or struct(), source = struct()
% 
% updates the srtuct target by adding the source strut at its end
% if target = [], it is initialised by the first struct in source


if isempty(target)
    target = source(1);
    starti = 2;
else
    starti = 1;
end

for i = starti:numel(source)
    target(end+1) = source(i);
end