I am acquiring physiological data, during each routine of my experiment.
For each routine, I save the name of the routine, time, and data of 8 channels (a total of 9 columns), in a text file.
The entire text file is very big (>20Gb) and matlab cannot handle it fully. I added a sample of it below.
Each routine begins with the word "Routine", then the follwing row contains the headers and the following rows contains the data.
Could you please help me to:
- Extract the name of each routine and its row index
- Extract the 8 columns of values for each routine and save it in matrix ( and then in a .mat).
I tried to use textscan but I was not able to call correctly my data I guess
I tried strfind but it returned the starting indexe of each "Routine" but I did not know how to extract the rest of the line and or the values for each routine
I also looked into regexprep, fgetl etc. but I am slighlty lost on how to handle such big files as characters…
——————————-
sample of a file
Routine Signal Acq and Paramet with condition standardTime [Val- channel1] [Val- channel2] [Val- channel3] [Val- channel4] [Tr-channel1] [Tr-channel2] [Tr-channel3] [Tr-channel4] 2.5936 -0.00054016 0.0066925 0.0017426 0.049998 0 0 0 0 4.0773 -0.00053864 0.0066956 0.0017456 0.049998 0 0 0 0 4.1159 -0.00054016 0.006694 0.0017456 0.049998 0 0 0 0 4.1469 -0.00054016 0.006694 0.0017426 0.049998 0 0 0 0 4.1511 -0.00054779 0.006694 0.0017395 0.049998 0 0 0 0 4.1531 -0.00054626 0.006694 0.0017395 0.049998 0 0 0 0 4.1553 -0.00054626 0.0066956 0.001741 0.049998 0 0 0 0 4.1584 -0.00054474 0.006694 0.0017426 0.049998 0 0 0 0 4.1619 -0.00054779 0.006694 0.0017456 0.049998 0 0 0 0 4.1653 -0.00053864 0.006694 0.0017456 0.049998 0 0 0 0 4.1686 -0.00053711 0.0066925 0.0017471 0.049998 0 0 0 0 4.1713 -0.00054016 0.0066895 0.001741 0.049998 0 0 0 0 4.1751 -0.00054932 0.006694 0.0017395 0.049998 0 0 0 0 4.1779 -0.00054474 0.006694 0.0017426 0.049998 0 0 0 0 4.1799 -0.00053406 0.0066925 0.0017502 0.049998 0 0 0 0 4.1827 -0.00053711 0.0066956 0.0017487 0.049998 0 0 0 0 4.1848 -0.00054016 0.0066925 0.0017471 0.049998 0 0 0 0 4.1875 -0.00054321 0.006694 0.0017441 0.049998 0 0 0 0 4.1903 -0.00053711 0.006694 0.0017471 0.049998 0 0 0 0 4.1923 -0.00054016 0.006694 0.0017502 0.049998 0 0 0 0 4.1943 -0.00053864 0.0066895 0.0017426 0.049998 0 0 0 0 4.1971 -0.00054169 0.006694 0.0017395 0.049998 0 0 0 0 4.1994 -0.00054626 0.0066956 0.0017441 0.049998 0 0 0 0 4.2018 -0.00054474 0.006694 0.0017487 0.049998 0 0 0 0 4.204 -0.00056 0.0066925 0.0017456 0.049998 0 0 0 0 4.2065 -0.00055389 0.0066956 0.0017426 0.049998 0 0 0 0 4.2966 -0.00054626 0.0066925 0.001741 0.049998 0 0 0 0 4.2992 -0.00054474 0.0066895 0.0017426 0.049998 0 0 0 0 4.3013 -0.00053711 0.006694 0.0017456 0.049998 0 0 0 0 4.3045 -0.00052643 0.0066925 0.0017502 0.049998 0 0 0 0 4.3068 -0.00053253 0.0066925 0.0017502 0.049998 0 0 0 0 4.3087 -0.00053406 0.006694 0.0017471 0.049998 0 0 0 0 4.311 -0.00053711 0.0066925 0.0017517 0.049998 0 0 0 0 4.3132 -0.00054169 0.0066956 0.0017532 0.049998 0 0 0 0 4.3155 -0.00053864 0.006694 0.0017532 0.049998 0 0 0 0 4.3179 -0.00053711 0.006694 0.0017471 0.049998 0 0 0 0 4.3207 -0.00052795 0.006694 0.0017532 0.049998 0 0 0 0 4.3237 -0.00052338 0.006694 0.0017532 0.049998 0 0 0 0 4.3265 -0.00053558 0.0066925 0.0017502 0.049998 0 0 0 0 4.3298 -0.00054779 0.0066925 0.0017441 0.049998 0 0 0 0 4.3319 -0.00054779 0.0066956 0.0017456 0.049998 0 0 0 0 4.334 -0.00055084 0.0066925 0.001741 0.049998 0 0 0 0 4.3358 -0.00054932 0.006694 0.0017441 0.049998 0 0 0 0 4.3378 -0.00055084 0.006694 0.0017502 0.049998 0 0 0 0 4.3398 -0.00055389 0.006694 0.0017532 0.049998 0 0 0 0 4.3426 -0.00055237 0.0066925 0.0017517 0.049998 0 0 0 0 4.345 -0.00053558 0.0066971 0.0017532 0.049998 0 0 0 0 4.3475 -0.00053101 0.0066971 0.0017441 0.049998 0 0 0 0 4.3496 -0.00053864 0.0066956 0.0017349 0.049998 0 0 0 0 4.3767 -0.00054474 0.006694 0.001738 0.049998 0 0 0 0 4.3796 -0.00054626 0.006694 0.0017426 0.049998 0 0 0 0 4.3814 -0.00053558 0.006694 0.0017456 0.049998 0 0 0 0 4.3831 -0.00052795 0.0066956 0.0017517 0.049998 0 0 0 0 4.3846 -0.00054169 0.0066971 0.0017365 0.049998 0 0 0 0 4.386 -0.00054779 0.0066956 0.0017319 0.049998 0 0 0 0 4.3876 -0.00053864 0.0066971 0.0017365 0.049998 0 0 0 0 4.3892 -0.00054016 0.0066956 0.0017441 0.049998 0 0 0 0 4.3908 -0.00054016 0.0066956 0.0017487 0.049998 0 0 0 0 4.3925 -0.00054932 0.0066956 0.0017441 0.049998 0 0 0 0 4.3943 -0.00054474 0.006694 0.0017395 0.049998 0 0 0 0 4.396 -0.00054016 0.0066956 0.0017365 0.049998 0 0 0 0 4.4216 -0.00054626 0.0066971 0.0017349 0.049998 0 0 0 0 4.4255 -0.00055237 0.0066971 0.0017288 0.049998 0 0 0 0Routine Signal Acq and Paramet with condition standardTime [Val- channel1] [Val- channel2] [Val- channel3] [Val- channel4] [Tr-channel1] [Tr-channel2] [Tr-channel3] [Tr-channel4] -155750.71 -0.00054016 0.0066925 0.0017426 0.049998 0 0 0 0 -155749.23 -0.00053864 0.0066956 0.0017456 0.049998 0 0 0 0 -155749.19 -0.00054016 0.006694 0.0017456 0.049998 0 0 0 0 -155749.16 -0.00054016 0.006694 0.0017426 0.049998 0 0 0 0 -155749.15 -0.00054779 0.006694 0.0017395 0.049998 0 0 0 0 -155749.15 -0.00054626 0.006694 0.0017395 0.049998 0 0 0 0 -155749.15 -0.00054626 0.0066956 0.001741 0.049998 0 0 0 0 -155749.14 -0.00054474 0.006694 0.0017426 0.049998 0 0 0 0 -155749.14 -0.00054779 0.006694 0.0017456 0.049998 0 0 0 0 -155749.14 -0.00053864 0.006694 0.0017456 0.049998 0 0 0 0 -155749.13 -0.00053711 0.0066925 0.0017471 0.049998 0 0 0 0 -155749.13 -0.00054016 0.0066895 0.001741 0.049998 0 0 0 0 -155749.13 -0.00054932 0.006694 0.0017395 0.049998 0 0 0 0 -155749.12 -0.00054474 0.006694 0.0017426 0.049998 0 0 0 0 -155749.12 -0.00053406 0.0066925 0.0017502 0.049998 0 0 0 0 -155749.12 -0.00053711 0.0066956 0.0017487 0.049998 0 0 0 0 -155749.12 -0.00054016 0.0066925 0.0017471 0.049998 0 0 0 0 -155749.12 -0.00054321 0.006694 0.0017441 0.049998 0 0 0 0 -155749.11 -0.00053711 0.006694 0.0017471 0.049998 0 0 0 0 -155749.11 -0.00054016 0.006694 0.0017502 0.049998 0 0 0 0 -155749.11 -0.00053864 0.0066895 0.0017426 0.049998 0 0 0 0 -155749.11 -0.00054169 0.006694 0.0017395 0.049998 0 0 0 0 -155749.1 -0.00054626 0.0066956 0.0017441 0.049998 0 0 0 0 -155749.1 -0.00054474 0.006694 0.0017487 0.049998 0 0 0 0 -155749.1 -0.00056 0.0066925 0.0017456 0.049998 0 0 0 0 -155749.1 -0.00055389 0.0066956 0.0017426 0.049998 0 0 0 0 -155749.01 -0.00054626 0.0066925 0.001741 0.049998 0 0 0 0 -155749 -0.00054474 0.0066895 0.0017426 0.049998 0 0 0 0 -155749 -0.00053711 0.006694 0.0017456 0.049998 0 0 0 0 -155749 -0.00052643 0.0066925 0.0017502 0.049998 0 0 0 0 -155749 -0.00053253 0.0066925 0.0017502 0.049998 0 0 0 0 -155748.99 -0.00053406 0.006694 0.0017471 0.049998 0 0 0 0 -155748.99 -0.00053711 0.0066925 0.0017517 0.049998 0 0 0 0 -155748.99 -0.00054169 0.0066956 0.0017532 0.049998 0 0 0 0 -155748.99 -0.00053864 0.006694 0.0017532 0.049998 0 0 0 0 -155748.98 -0.00053711 0.006694 0.0017471 0.049998 0 0 0 0 -155748.98 -0.00052795 0.006694 0.0017532 0.049998 0 0 0 0 -155748.98 -0.00052338 0.006694 0.0017532 0.049998 0 0 0 0 -155748.98 -0.00053558 0.0066925 0.0017502 0.049998 0 0 0 0 -155748.97 -0.00054779 0.0066925 0.0017441 0.049998 0 0 0 0 -155748.97 -0.00054779 0.0066956 0.0017456 0.049998 0 0 0 0 -155748.97 -0.00055084 0.0066925 0.001741 0.049998 0 0 0 0 -155748.97 -0.00054932 0.006694 0.0017441 0.049998 0 0 0 0 -155748.97 -0.00055084 0.006694 0.0017502 0.049998 0 0 0 0 -155748.96 -0.00055389 0.006694 0.0017532 0.049998 0 0 0 0 -155748.96 -0.00055237 0.0066925 0.0017517 0.049998 0 0 0 0 -155748.96 -0.00053558 0.0066971 0.0017532 0.049998 0 0 0 0 -155748.96 -0.00053101 0.0066971 0.0017441 0.049998 0 0 0 0 -155748.95 -0.00053864 0.0066956 0.0017349 0.049998 0 0 0 0 -155748.93 -0.00054474 0.006694 0.001738 0.049998 0 0 0 0 -155748.92 -0.00054626 0.006694 0.0017426 0.049998 0 0 0 0 -155748.92 -0.00053558 0.006694 0.0017456 0.049998 0 0 0 0 -155748.92 -0.00052795 0.0066956 0.0017517 0.049998 0 0 0 0 -155748.92 -0.00054169 0.0066971 0.0017365 0.049998 0 0 0 0 -155748.92 -0.00054779 0.0066956 0.0017319 0.049998 0 0 0 0 -155748.92 -0.00053864 0.0066971 0.0017365 0.049998 0 0 0 0 -155748.91 -0.00054016 0.0066956 0.0017441 0.049998 0 0 0 0 -155748.91 -0.00054016 0.0066956 0.0017487 0.049998 0 0 0 0 -155748.91 -0.00054932 0.0066956 0.0017441 0.049998 0 0 0 0 -155748.91 -0.00054474 0.006694 0.0017395 0.049998 0 0 0 0 -155748.91 -0.00054016 0.0066956 0.0017365 0.049998 0 0 0 0 -155748.88 -0.00054626 0.0066971 0.0017349 0.049998 0 0 0 0 -155748.88 -0.00055237 0.0066971 0.0017288 0.049998 0 0 0 0 -155748.88 -0.00055847 0.0066971 0.0017303 0.049998 0 0 0 0 -155748.87 -0.00055237 0.0066956 0.0017303 0.049998 0 0 0 0 -155748.87 -0.00054474 0.0066925 0.001738 0.049998 0 0 0 0 -155748.87 -0.00053558 0.0066971 0.001741 0.049998 0 0 0 0 -155748.87 -0.00053711 0.0066956 0.001741 0.049998 0 0 0 0 -155748.86 -0.00054169 0.0066971 0.0017365 0.049998 0 0 0 0 -155748.86 -0.00054626 0.0066971 0.0017319 0.049998 0 0 0 0 -155748.86 -0.00054626 0.0066971 0.0017319 0.049998 0 0 0 0 -155748.86 -0.00054626 0.006694 0.0017349 0.049998 0 0 0 0 -155748.86 -0.00054321 0.0066971 0.0017349 0.049998 0 0 0 0 -155748.85 -0.00053711 0.0066956 0.001738 0.049998 0 0 0 0 -155748.85 -0.00053558 0.0066956 0.0017395 0.049998 0 0 0 0 -155748.85 -0.00054016 0.0066986 0.001741 0.049998 0 0 0 0 -155748.85 -0.00054169 0.0066971 0.001738 0.049998 0 0 0 0 -155748.84 -0.00054321 0.0066971 0.001741 0.049998 0 0 0 0 -155748.84 -0.00054169 0.0066971 0.001738 0.049998 0 0 0 0 -155748.84 -0.00053711 0.0066971 0.0017441 0.049998 0 0 0 0 -155748.84 -0.00053864 0.0066986 0.0017456 0.049998 0 0 0 0 -155748.83 -0.00054016 0.0066971 0.0017426 0.049998 0 0 0 0 -155748.83 -0.00053558 0.0066971 0.0017426 0.049998 0 0 0 0 -155748.83 -0.00053711 0.0067001 0.0017441 0.049998 0 0 0 0 -155748.83 -0.00053711 0.0066986 0.001738 0.049998 0 0 0 0 -155748.83 -0.00053711 0.0066956 0.001741 0.049998 0 0 0 0 -155748.82 -0.00053864 0.0066971 0.0017426 0.049998 0 0 0 0 -155748.82 -0.00054016 0.0066986 0.0017395 0.049998 0 0 0 0 -155748.82 -0.00053711 0.0067001 0.0017426 0.049998 0 0 0 0 -155748.82 -0.00053711 0.0067017 0.0017426 0.049998 0 0 0 0 -155748.81 -0.00053253 0.0067001 0.0017441 0.049998 0 0 0 0 -155748.81 -0.00053558 0.0066986 0.0017441 0.049998 0 0 0 0 -155748.81 -0.00052795 0.0067001 0.001738 0.049998 0 0 0 0 -155748.81 -0.0005249 0.0066986 0.001738 0.049998 0 0 0 0 -155748.8 -0.00052643 0.0066986 0.0017426 0.049998 0 0 0 0 -155748.8 -0.00053253 0.0066986 0.0017456 0.049998 0 0 0 0 -155748.8 -0.00053558 0.0067001 0.0017487 0.049998 0 0 0 0 -155748.8 -0.00053711 0.0066986 0.0017471 0.049998 0 0 0 0 -155748.8 -0.00053711 0.0066986 0.0017426 0.049998 0 0 0 0 -155748.79 -0.00053558 0.0067001 0.0017456 0.049998 0 0 0 0 -155748.79 -0.00053406 0.0067001 0.0017441 0.049998 0 0 0 0 -155748.79 -0.00053406 0.0067017 0.0017395 0.049998 0 0 0 0 -155748.78 -0.00053406 0.0067017 0.0017426 0.049998 0 0 0 0 -155748.78 -0.00053406 0.0067017 0.0017426 0.049998 0 0 0 0 -155748.78 -0.00053558 0.0067017 0.0017441 0.049998 0 0 0 0 -155748.78 -0.00053101 0.0067001 0.0017426 0.049998 0 0 0 0 -155748.78 -0.00053558 0.0067017 0.0017441 0.049998 0 0 0 0 -155748.77 -0.00053101 0.0067017 0.0017441 0.049998 0 0 0 0 -155748.77 -0.00052643 0.0067017 0.0017487 0.049998 0 0 0 0 -155748.77 -0.00052643 0.0067032 0.0017456 0.049998 0 0 0 0 -155748.77 -0.00053253 0.0067001 0.001741 0.049998 0 0 0 0 -155747.77 -0.00053711 0.0067047 0.001741 0.049998 0 0 0 0Routine visu_exp with condition 4Time [Val- channel1] [Val- channel2] [Val- channel3] [Val- channel4] [Tr-channel1] [Tr-channel2] [Tr-channel3] [Tr-channel4] -199064.97 -0.00054016 0.0066925 0.0017426 0.049998 0 0 0 0 -199063.48 -0.00053864 0.0066956 0.0017456 0.049998 0 0 0 0 -199063.44 -0.00054016 0.006694 0.0017456 0.049998 0 0 0 0 -199063.41 -0.00054016 0.006694 0.0017426 0.049998 0 0 0 0 -199063.41 -0.00054779 0.006694 0.0017395 0.049998 0 0 0 0 -199063.41 -0.00054626 0.006694 0.0017395 0.049998 0 0 0 0 -199063.4 -0.00054626 0.0066956 0.001741 0.049998 0 0 0 0 -199063.4 -0.00054474 0.006694 0.0017426 0.049998 0 0 0 0 -199063.4 -0.00054779 0.006694 0.0017456 0.049998 0 0 0 0 -199063.39 -0.00053864 0.006694 0.0017456 0.049998 0 0 0 0 -199063.39 -0.00053711 0.0066925 0.0017471 0.049998 0 0 0 0 -199063.39 -0.00054016 0.0066895 0.001741 0.049998 0 0 0 0 -199063.39 -0.00054932 0.006694 0.0017395 0.049998 0 0 0 0 -199063.38 -0.00054474 0.006694 0.0017426 0.049998 0 0 0 0 -199063.38 -0.00053406 0.0066925 0.0017502 0.049998 0 0 0 0 -199063.38 -0.00053711 0.0066956 0.0017487 0.049998 0 0 0 0 -199063.38 -0.00054016 0.0066925 0.0017471 0.049998 0 0 0 0 -199063.37 -0.00054321 0.006694 0.0017441 0.049998 0 0 0 0 -199063.37 -0.00053711 0.006694 0.0017471 0.049998 0 0 0 0 -199063.37 -0.00054016 0.006694 0.0017502 0.049998 0 0 0 0 -199063.37 -0.00053864 0.0066895 0.0017426 0.049998 0 0 0 0 -199063.36 -0.00054169 0.006694 0.0017395 0.049998 0 0 0 0 -199063.36 -0.00054626 0.0066956 0.0017441 0.049998 0 0 0 0 -199063.36 -0.00054474 0.006694 0.0017487 0.049998 0 0 0 0 -199063.36 -0.00056 0.0066925 0.0017456 0.049998 0 0 0 0 -199063.35 -0.00055389 0.0066956 0.0017426 0.049998 0 0 0 0 -199063.26 -0.00054626 0.0066925 0.001741 0.049998 0 0 0 0 -199063.26 -0.00054474 0.0066895 0.0017426 0.049998 0 0 0 0 -199063.26 -0.00053711 0.006694 0.0017456 0.049998 0 0 0 0 -199063.26 -0.00052643 0.0066925 0.0017502 0.049998 0 0 0 0 -199063.25 -0.00053253 0.0066925 0.0017502 0.049998 0 0 0 0 -199063.25 -0.00053406 0.006694 0.0017471 0.049998 0 0 0 0 -199063.25 -0.00053711 0.0066925 0.0017517 0.049998 0 0 0 0 -199063.25 -0.00054169 0.0066956 0.0017532 0.049998 0 0 0 0 -199063.24 -0.00053864 0.006694 0.0017532 0.049998 0 0 0 0 -199063.24 -0.00053711 0.006694 0.0017471 0.049998 0 0 0 0 -199063.24 -0.00052795 0.006694 0.0017532 0.049998 0 0 0 0 -199063.24 -0.00052338 0.006694 0.0017532 0.049998 0 0 0 0 -199063.23 -0.00053558 0.0066925 0.0017502 0.049998 0 0 0 0 -199063.23 -0.00054779 0.0066925 0.0017441 0.049998 0 0 0 0 -199063.23 -0.00054779 0.0066956 0.0017456 0.049998 0 0 0 0 -199063.23 -0.00055084 0.0066925 0.001741 0.049998 0 0 0 0 -199063.22 -0.00054932 0.006694 0.0017441 0.049998 0 0 0 0 -199063.22 -0.00055084 0.006694 0.0017502 0.049998 0 0 0 0 -199063.22 -0.00055389 0.006694 0.0017532 0.049998 0 0 0 0 -199063.22 -0.00055237 0.0066925 0.0017517 0.049998 0 0 0 0 -199063.22 -0.00053558 0.0066971 0.0017532 0.049998 0 0 0 0 -199063.21 -0.00053101 0.0066971 0.0017441 0.049998 0 0 0 0 -199063.21 -0.00053864 0.0066956 0.0017349 0.049998 0 0 0 0 -199063.18 -0.00054474 0.006694 0.001738 0.049998 0 0 0 0 -199063.18 -0.00054626 0.006694 0.0017426 0.049998 0 0 0 0 -199063.18 -0.00053558 0.006694 0.0017456 0.049998 0 0 0 0 -199063.18 -0.00052795 0.0066956 0.0017517 0.049998 0 0 0 0 -199063.18 -0.00054169 0.0066971 0.0017365 0.049998 0 0 0 0 -199063.17 -0.00054779 0.0066956 0.0017319 0.049998 0 0 0 0 -199063.17 -0.00053864 0.0066971 0.0017365 0.049998 0 0 0 0 -199063.17 -0.00054016 0.0066956 0.0017441 0.049998 0 0 0 0 -199063.17 -0.00054016 0.0066956 0.0017487 0.049998 0 0 0 0 -199063.17 -0.00054932 0.0066956 0.0017441 0.049998 0 0 0 0 -199063.17 -0.00054474 0.006694 0.0017395 0.049998 0 0 0 0 -199063.16 -0.00054016 0.0066956 0.0017365 0.049998 0 0 0 0 -199063.14 -0.00054626 0.0066971 0.0017349 0.049998 0 0 0 0 -199063.13 -0.00055237 0.0066971 0.0017288 0.049998 0 0 0 0 -199063.13 -0.00055847 0.0066971 0.0017303 0.049998 0 0 0 0 -199063.13 -0.00055237 0.0066956 0.0017303 0.049998 0 0 0 0 -199063.13 -0.00054474 0.0066925 0.001738 0.049998 0 0 0 0 -199063.13 -0.00053558 0.0066971 0.001741 0.049998 0 0 0 0 -199063.12 -0.00053711 0.0066956 0.001741 0.049998 0 0 0 0 -199063.12 -0.00054169 0.0066971 0.0017365 0.049998 0 0 0 0 -199063.12 -0.00054626 0.0066971 0.0017319 0.049998 0 0 0 0 -199063.12 -0.00054626 0.0066971 0.0017319 0.049998 0 0 0 0 -199063.11 -0.00054626 0.006694 0.0017349 0.049998 0 0 0 0 -199063.11 -0.00054321 0.0066971 0.0017349 0.049998 0 0 0 0 -199063.11 -0.00053711 0.0066956 0.001738 0.049998 0 0 0 0 -199063.11 -0.00053558 0.0066956 0.0017395 0.049998 0 0 0 0 -199063.11 -0.00054016 0.0066986 0.001741 0.049998 0 0 0 0 -199063.1 -0.00054169 0.0066971 0.001738 0.049998 0 0 0 0 -199063.1 -0.00054321 0.0066971 0.001741 0.049998 0 0 0 0
Best Answer