readfiletoc

Reads a file and display its table of contents (data structure) in a hierarchical way using nested cells. Files are read using the CAE readers provided with Activate, which support a large set of file formats.

Syntax

readfiletoc(filename)

R = readfiletoc(...)

Inputs

filename
Path and name of the file to be read.
Type: string

Outputs

R
Cell (containing nested cells) that displays the structure of the data read in the input file.
Type: cell

Example

readfiletoc generic example, where the returned cell is organized as nested cells.

rcell=readfiletoc('Path/filename')
rcell(1,3)
rcell{1,1} = FileName
rcell{1,2} = Number of subcases (a)
rcell{1,3} = r1cell(a,3) – (value of 'a' is 1 if number of subcases is zero)
                     r1cell{1,1} = 1st subcase name
                     r1cell{1,2} = Number of Types in 1st subcase (b)
                     r1cell{1,3} = r2cell(b,3)
                                       r2cell{1,1} = 1st Type name
                                       r2cell{1,2} = number of requests in 1st type ( c  )
                                       r2cell{1,3} = r3cell(c,3)
                                                           r3cell{1,1} = 1st request name
                                                           r3cell{1,2} = number of components in 1st request (d)
                                                           r3cell{1,3} = r4cell(d,1)
                                                                              r4cell{1,1}= 1st component name