NC_MergeFilesΒΆ

NC_MergeFiles merges NC files into a new NC file by adding the channels to the destination file.

oError = NC_MergeFiles(svNCAdd, ssNCDest)

Return Value

Is 0, if no error occurred or an error object, see error_create.

Parameters

svNCAdd

svNCAdd is a vector with NC file names. All channels from all files will be added to the file ssNCDest. The global attributes will only be added to the destination file from the first file.

ssNCDest

ssNCDest is the new NC file name.

Comment

If a channel name occurs multiple times in different files, the first channel name will be added without modifing the name. If found again the number 0, 1, 2, etc. will be added.

The global attributes will be copied from the first file to the destination file.

If the file contains multiple matrices, for example an MDF file, the channels will be added to a matrix with the identical number of records.

Example

svNCAdd = "C:\\nc-daten\\" +  ...
 ["Test1.xls.nc2",
  "Test2.xls.nc2",
  "Test3.xls.nc2",
  "Test4.xls.nc2"];

ssNewName = "d:/a.nc";

oError = NC_MergeFiles(svNCAdd, ssNewName);
if (type(oError) == "error") {
   MessageBoxError(oError.message);
} else {
   NC_Edit(ssNewName);
}

History

Version Description
R2015.8 New.

id-1712210