'copyfields' copy fields between two matlab structures %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OUPUT: NewData: resulting structure INPUT: listfields: cell arrays representing the list of field names to be copied SourceData: structure containing the source data to copy in NewData OldData: (optional) preexisting data structure.