function Final_XYZ = extract_event(event,XYZ)

[dum start_ind] = min(abs(XYZ.Matlabtime-datenum(event{1}.start,'HH.MM.SS')));
[dum stop_ind] = min(abs(XYZ.Matlabtime-datenum(event{1}.stop,'HH.MM.SS')));

Final_XYZ = [XYZ.X_RD(start_ind:stop_ind)' XYZ.Y_RD(start_ind:stop_ind)'...
    XYZ.Z_RD(start_ind:stop_ind)'- str2double(event{1}.height)]; 

