Main Content

readMemberData

Extract data from an ensemble member given a path

Description

readMemberData is a function used in code generated by Diagnostic Feature Designer.

data = readMemberData(memberdata,path) reads the value under the path path from member data memberdata. This syntax returns data of the same data type as the value under path.

data = readMemberData(memberdata,path,variablenames) reads the values of the variable names in variablenames. For example, Vibration = readMemberData(member,"Vibration",["Time","Data"]) reads the Vibration variables Time and Data from the current member row. This syntax returns a table.

data = readMemberData(___,'FrameInterval',interval) reads the values contained within a frame interval that is specified by the frame start and stop times. Use this syntax when path starts with FRM, which indicates that the data to be read is segmented into frames. You can use this syntax with any of the input argument combinations in previous syntaxes.

Input Arguments

collapse all

Member data set, specified as a table. memberdata represents one ensemble member read from a multimember ensemble data set.

Path, specified as a scalar string or a character array that represents the highest level variable name. For example, "Vibration" is a path that might contain the lower level variable names time and data.

Variable names under a path, specified as a scalar string, a character array, a string array, or a cell array of character arrays. For example, ["Time","Data"] might be variable names under the path "Vibration".

Frame start and stop times, specified as an array with two elements. When reading frame-based data, interval identifies a specific frame within the frame sequence. For example, if the full signal ranges from 0 to 20 seconds, and the frame size and frame rate specifications are each one second, the first interval is approximately [0 1].

Output Arguments

collapse all

Member data values extracted from the member data, returned as:

  • A table, if variablenames has been specified. data contains the same column names as variablenames if variablenames is a string array or a cell array of character arrays.

  • The same data type as the value under path, if variablenames has not been specified.

Version History

Introduced in R2020a