%npts=length(ship.mday);
fno=fieldnames(ship);
for i=1:size(fno,1)
    field_name=fno{i};
    if append==0,
        cmd=sprintf('%s=ship.%s;', field_name, field_name);
    else
        cmd=sprintf('%s=[%s; ship.%s];', field_name, field_name, field_name);
    end
    eval(cmd);
end
