readvector

Reads data vector from a file. The data is organized in terms of subcase, type, request, and component. The function has two forms. Use the first form when there is zero or at most one subcase and use the second form when there are multiple subcases.

Attention: Available only with Activate commercial edition.

Syntax

readvector(filename, datatype, request, component)

readvector(filename, subcase, datatype, request, component)

R = readvector(...)

Inputs

filename
Path of the file to be read.
Type: string
subcase
Subcase name or index in the file to be read.
Type: string | int
datatype
Data type name or index in the file to be read.
Type: string | int | cell
request
Request name or index in the file to be read.
Type: string | int | cell
component
Component name or index in the file to be read.
Type: string | int | cell

Outputs

R
Data vector read from the file.

Examples

readvector with two components where data contains no subcase:

readvector('Path/To/File/ANGACC','Angular Acceleration', '50th% Hybrid3   - UPPER LEG RIGHT', [1,2])
R = {
[1,1] [Matrix] 1 x 151
41.31 24.00461 10.52519 10.25956 43.04401 87.7837 149.5576 221.2598 300.551 387.1617 466.7354 534.3468 585.2947 615.5307 566.8021 468.2099 361.2388 287.6936 198.9693 113.7598 51.08946 23.76001 21.17246 65.32874 139.9702 269.7826 378.6036 478.7004 451.1214 320.8372 216.3064 222.0823 42.29424 43.26625 61.78921 85.14232 48.18278 140.677 306.1331 453.6186 546.9651 436.0052 192.1151 110.8438 83.71523 86.70725 30.79169 28.93641 89.27975 41.30714 101.1548 92.43036 148.5467 150.3652 265.5582 168.4049 123.329 47.5519 293.857 318.569 288.8703 355.0772 326.7503 368.0159 398.2088 391.4819 414.7182 422.5965 450.4683 447.3867 465.5126 493.7898 505.8015 470.9001 698.3899 930.072 906.9985 830.7093 801.4978 789.5136 779.3958 742.4711 727.1056 707.8744 679.4455 676.084 663.5952 670.1764 646.2468 524.5698 327.7744 875.6606 2162.889 3467.329 5731.129 3358.024 1102.481 127.791 393.2722 356.77 296.6112 223.1329 145.6478 116.5569 88.57738 75.92633 76.14735 77.41099 95.0481 96.32401 110.488 110.2334 112.5211 122.7225 123.4832 128.4337 132.5983 140.7237 136.1502 132.7557 129.2217 120.2712 111.562 105.9606 94.45851 89.98181 94.34222 96.63957 95.08777 99.77671 101.0932 104.0803 105.5192 113.0291 121.4189 130.7664 125.3845 121.4608 124.3057 116.6263 109.5246 104.8782 98.63567 92.59457 86.12211 78.42558 72.4076 67.17162 62.9161 52.74131 45.29298 
[1,2] [Matrix] 1 x 151
-3.169199 -2.567382 -0.876079 0.9551558 3.808171 7.31353 12.43681 17.73634 23.02849 28.62572 33.08607 35.85012 36.38001 33.38028 -128.8429 -157.2177 -1.266258 -7.080412 -14.08353 -19.52511 -22.13351 -21.77865 -18.24147 -11.69226 33.74058 29.06945 62.42713 204.3784 82.16896 71.58844 7.630776 103.5044 -17.41088 -41.23704 -47.5939 -36.19685 8.357497 -49.93034 -33.4065 -25.14318 -184.1285 -238.5833 -67.03612 -25.73869 -19.03484 17.81099 -24.29716 -3.626939 -87.03694 -26.05679 58.90304 18.58782 -145.5742 -141.3638 -213.127 -62.15358 87.69718 34.40758 -25.19436 25.32535 37.12352 42.95326 -25.64565 -8.403437 41.01218 34.68236 27.58236 8.326859 36.56124 4.798041 28.10466 5.795107 45.44237 -27.76124 -36.35482 -47.84296 -52.71898 -36.15545 -37.28146 -15.29102 19.62379 6.9234 29.86131 32.14459 24.35589 31.64228 -15.09 17.76124 13.24889 -5.129383 -2.363511 60.47055 217.3928 2246.031 5117.534 3057.48 780.7008 1.156935 -32.42703 -38.26091 -52.09199 -47.93758 -52.53988 -58.6724 -55.89821 -59.94848 -58.16412 -56.39275 -67.7155 -63.16425 -71.66627 -66.89284 -63.49091 -64.30333 -60.44163 -58.52371 -56.01702 -60.64366 -59.5619 -64.57291 -67.19014 -64.64387 -62.8458 -62.09832 -54.06249 -49.32551 -51.46972 -50.8803 -47.79961 -50.76887 -49.79744 -49.60178 -48.96897 -49.45848 -51.34798 -55.1112 -51.89565 -48.48554 -50.52039 -41.49457 -38.21749 -36.57678 -31.38013 -29.3906 -25.28947 -19.16569 -15.21284 -11.23474 -10.08584 -4.631946 -1.858893
readvector where data contains multiple subcases:
readvector('Path/To/File/modal_participation.f06','Subcase 11','Natural Frequency','FLUID','REL | Mode')
R = {
[Matrix] 1 x 8
2  3  5  1  4  8  7  6

Comments

When using readvector without the use of releasefileinfo in sequence, the subsequent executions of the script will load a version of the file that is already in the memory, not from the disk.