How can I separate data in the text file in order to take only some information
Show older comments
Dear users, I hope you can help me with this issue. This is part of my .txt file:
<01/22/2013 13:34:04> <Debug> <BCF2AF19410A> <BCF2AF> <INT6400 based Powerline networking device.> <nmdev059_7004> <Caller-90> <Thread-89163> <CPE soap message>
Host : 172.31.110.59:7003 User-Agent : TR069 Client 1.0 Content-Type : text/xml; charset=utf-8 Authorization : Basic ZGV2b2xvMjpkZXZvbG8= Cookie : JSESSIONID=15BfQ2Hcg15LGyLZvrnsPvNvgtCsRp0qPJNThfmGxQDjhNwzYfRq!-670712735
Device.HomePlug.Interface.1.AssociatedDevice.1.SNRPerTone
<Value xsi:type= "xsd:string">28.1,28.4,28.5,29.1,28.8,28.7,28.9,29.0,29.3,29.8,29.7,29.7,29.5,29.5,29.5,29.5,29.6,29.8,29.7</Value>
</ParameterValueStruct>
<Name>Device.HomePlug.Interface.1.AssociatedDevice.1.RxPhyRate</Name>
<Value xsi:type="xsd:unsignedInt">120</Value>
<Name>Device.HomePlug.Interface.1.AssociatedDevice.1.EndStationMACs</Name>
<Value xsi:type="xsd:string">4e:40:3e:65:4d:c6,ac:81:12:82:7b:60,02:aa:aa:00:01:15</Value>
<Name>Device.HomePlug.Interface.1.AssociatedDevice.1.AvgAttenuation</Name>
<Value xsi:type="xsd:unsignedInt">0</Value>
<Name>Device.HomePlug.Interface.1.AssociatedDevice.1.Active</Name>
<Value xsi:type="xsd:boolean">1</Value>
<ParameterValueStruct>
Device.HomePlug.Interface.1.AssociatedDevice.2.MACAddress
<Value xsi:type="xsd:string">bc:f2:af:19:3d:97</Value>"
And this data is repeated lot of times. Then, at each time, I need to take some parameters names with their values. Thus, my question is: after I read this file in MATLAB how can I separate the information that I need in new variables. For example date and time, SNR per Tone, AvgAttenuation.
I hope you can help me with this issue.
Answers (0)
Categories
Find more on Text Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!