matlab - Using textscan to read certain rows -


i trying read data text file using textscan matlab. currently, code provided below reads rows 1 4. need read rows 5 8, rows 9 13 , on. how achieve this?

fileid=fopen(filename); num_rows=4; nheaderlines = 2;  formatspec = '%*s %*s %s %s %*s %*s %*s %f %*s'; datain = textscan(fileid,formatspec,num_rows,'headerlines',nheaderlines, 'delimiter',',' ); fclose(fileid); 

use

file = fopen('myfile');              content = textscan(file,'%s','delimiter','\n'); fclose(file); 

and have lines in file cell array of strings. take number of rows want , process them like.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -