extract

Extracts specific subcase-type-request-component selections from the result of readmultvectors command.

Attention: Available only with Activate commercial edition.

Syntax

extract(datacell, datatype, request, component)

extract(datacell, subcase, datatype, request, component)

R = extract(...)

Inputs

datacell
Data returned from readmultvectors command (cell array).
Type: cell
subcase
Subcase in the datacell.
Type: string | int
datatype
Data type name in the datacell.
Type: string | int
request
Request name in the datacell.
Type: string | int
component
Component name in the datacell.
Type: string | int

Outputs

R

Example

Example 1 - readmultvectors/extract example. File without subcase and extraction using strings.

data = readmultvectors('Path/To/File/ANGACC');
R=extract(data,'Angular Acceleration', '50th% Hybrid3   - HEAD', 'Z-comp. ang. acc.')
R = [Matrix] 1 x 151
0.02710  0.16700  -0.12031  -0.04295  -0.42393  -1.16384  -1.60862  -2.88152
...
-57.66277  -60.35458  -69.75250  -90.46372  -101.97830
-- End print matrix [1 x 151]

Example 2 - readmultvectors/extract example. File without subcase and extraction using strings.

data_strings = {'Unknown','Block 1','X'; 'Unknown','Block 1','Y'};
datacell=readmultvectors('Path/To/File/data.csv’ ,data_strings);
R=extract(datacell, 'Unknown','Block 1','X')
R = [Matrix] 1 x 100
1 2 3 4 5 6 7 8 
...
96  97 98  99 100
-- End print matrix [1 x 100]

Example 3 - readmultvectors/extract example. File without subcase and extraction using indices.

data_index = {1,1,3;1,1,2};
datacell=readmultvectors('Path/To/File/data.csv’, data_index);
R=extract(datacell,1,1,3)
R = [Matrix] 1 x 100
1 2 3 4 5 6 7 8 
...
96  97 98  99 100
-- End print matrix [1 x 100]

Example 4 - readmultvectors/extract example. File without subcase and extraction using mixed strings and indices.

data_input = {1,'Block 1','X'; 1,'Block 1','Y'};
datacell=readmultvectors('Path/To/File/ data.csv’, data_input);
R=extract(datacell, 1,'Block 1','X')
R = [Matrix] 1 x 100
1 2 3 4 5 6 7 8 
...
96  97 98  99 100
-- End print matrix [1 x 100]

Example 5 - readmultvectors/extract example. File with subcase and extraction using strings.

data_strings = {'Subcase 1','Displacements','Point id 2086','REL | X-Trans';'Subcase 1','Displacements','Point id 2086','REL | Y-Trans'};
datacell=readmultvectors('Path/To/File/control_arm_sol111.pch’, data_strings);
R=extract(output_strings,'Subcase 1','Displacements','Point id 2086','REL | X-Trans')
R = [Matrix] 1 x 22
0.08723 0.07904 0.12283 0.03330 0.04030 0.03332 -0.32248 0.05113 0.04793 0.04848 -0.00423 0.02949 0.04300 0.03917 0.03933 0.03948 0.04076 0.05043 0.03672 0.02253 0.03086 0.03192

Example 6 - readmultvectors/extract example. File with subcase and extraction using indices.

data_index = {1,2,1,2;1,2,1,3};
datacell=readmultvectors('Path/To/File/control_arm_sol111.pch’,data_ index);
R=extract(datacell, 1,2,1,2)
ans = [Matrix] 1 x 22
0.08723 0.07904 0.12283 0.03330 0.04030 0.03332 -0.32248 0.05113 0.04793 0.04848 -0.00423 0.02949 0.04300 0.03917 0.03933 0.03948 0.04076 0.05043 0.03672 0.02253 0.03086 0.03192

Example 7 - readmultvectors/extract example. File with subcase and extraction using mixed strings and indices.

data_index = {'Subcase 1',2,'Point id 2086','REL | X-Trans';'Subcase 1',2,'Point id 2086','REL | Y-Trans'};
datacell=readmultvectors('Path/To/File/control_arm_sol111.pch’,data_ input);
R=extract(datacell,'Subcase 1',2,'Point id 2086','REL | X-Trans')
R = [Matrix] 1 x 22
0.08723 0.07904 0.12283 0.03330 0.04030 0.03332 -0.32248 0.05113 0.04793 0.04848 -0.00423 0.02949 0.04300 0.03917 0.03933 0.03948 0.04076 0.05043 0.03672 0.02253 0.03086 0.03192