Hello everyone. I have a big problem to Acquire a block of data structured in a particular way. Here's how the data are to be acquired (is a txt):
V|0|0|0|t|0|1|1|4|11|T4|H13||||||||||||
P|40|0.01|10|1|1|0|40|1|1|1||1|*||0|0|0
*|A1|A1|A7|A16|F|F|F|F|F|F|||||||||||||
*|codserv|area|codice|nome|tnom|tmin|tmax|pc|qc|susc|||||||
*|||||kV|kV|kV|MW|MVAR|S||||||||||||
N|I|1|N01|N01|132|125.4|138.6|0|0||||||||
N|I|1|N02|N02|20|19|21|0|0|||||||||||||
N|I|1|N03|N03|20|19|21|1.013532234|0.49087611||||||||
N|I|1|N04|N04|20|19|21|0.390791617|0.189269056||||||||
N|I|1|N05|N05|20|19|21|0.180634542|0.121387171||||||||
N|I|1|N06|N06|20|19|21|0.709472564|0.343613323||||||||
N|I|1|N07|N07|20|19|21|0.103495727|0.069549543||||||||
N|I|1|N08|N08|20|19|21|0.351712456|0.170342158||||||||
N|I|1|N09|N09|20|19|21|0.097697904|0.06565339||||||||
N|I|1|N10|N10|20|19|21|0.162165157|0.078540184||||||||
The algorithm should:
1)skip the first 3 rows 2)skip fifth row
2)The fourth row (*|codserv|area|codice|nome|tnom|tmin|tmax|pc|qc|susc|||||||) save each string in a vector empty codeserv=[] area=[] codice=[] nome=[] tnom=[] tmin=[] tmax=[] pc=[] qc=[] susc=[]
3)Fill vettors with data and strings in the rows following the fourth
codeserv=[N N N N N N N N N N ....] area=[I I I I I I I ....] codice=[1 1 1 1 1 1 ...] nome=[N01 N02 N03 N04 N05 ] tnom=[N01 N02 N03 N04 N05] tmin=[132 20 20.....] tmax=[125.4 19 19 19 ....] pc=[138.6 21 21 21....] qc=[0 0 1.013532234 ....] susc=[0 0 0.49087611]
Thanks in advance for your help and sorry for my English