Extract variables from a textfile in matlab -


i have large text file (~3500 lines) contains output data instrument. consists of repeated entries different measurements formatted follows:

* logframe start *

variablename1: value

variablename2: value

...

variablename35: value

* logframe end *

each logframe contains 35 variables. these extract two, 'vname' , 'emgmarker' , put associated values in columns in matlab array, (i.e. array should (vname,emgmarker) can associate data output file have in matlab array. have no idea start in order extract variables file, hence searches on internet far have been unsuccessful. advice on appreciated.

you use textscan:

c = textscan(file_id,'%s %f'); 

then extract variables of interest this:

vname_indices = strcmp(c{1},'vname:'); vname = c{2}(vname_indices); 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -