How do I separate raw data in columns, effectively?
이전 댓글 표시
I have been trying to take the raw data from a txt. file that came from a beagleboneblack (small application computer) and have had a few problems separating some of the values, how could I affect the file once it is imported so that specific rows are chosen.
I have a lot of data and cannot afford to sit down and pick them one by one. I have made separate file for most of them, but since they overlap in some cases it is impossible for me to see them correctly. here is an example:
Accel (mg), Mag (mGauss) 946808257.344 (-85.9375, 33.203125, 997.0703125), (-27.27272727272727, -357.27272727272725, 1.8181818181818181)] Gyro (dps) 946808257.346 (-2.532958984375, 0.6103515625, 1.0528564453125)] P(mbar), T(C) 946808257.35 1008.09423828125, 27.545833333333334] Accel (mg), Mag (mGauss) 946808257.443 (-83.984375, 30.2734375, 985.3515625), (-23.636363636363633, -351.81818181818181, 4.545454545454545)] Gyro (dps) 946808257.446 (-2.3651123046875, 0.396728515625, 0.9613037109375)] P(mbar), T(C) 946808257.449 1008.3203125, 27.556249999999999] Accel (mg), Mag (mGauss) 946808257.546 (-81.0546875, 29.296875, 989.2578125), (-23.636363636363633, -357.27272727272725, 0.90909090909090906)] Gyro (dps) 946808257.56 (-2.349853515625, 0.6256103515625, 0.701904296875)] P(mbar), T(C) 946808257.577 1007.97705078125, 27.524999999999999]
Thank you for your help!
댓글 수: 5
What is the raw data format? Surely there are records?
I looked up the board manual but obviously this is an app using the board that has its own support somewhere one presumes? Unless it's something developed where you're presently working in which case they should have that info.
Space Science undergrad
2013년 11월 15일
dpb
2013년 11월 15일
If you open a file in the Matlab editor what does it look like? Is it all on one long line w/ no separation of the various pieces?
Seems like it should be simple enough to hack the Python code to have it spit out something far more easily dealt with as a starting point...
Space Science undergrad
2013년 11월 15일
dpb
2013년 11월 15일
OK, if look in more detail, it appears there is a soft record marker of a ']' -- assuming that is so then it appears there are sets of three records each as follows...
Accel (mg), Mag (mGauss) 9...7.344 (-85, 33, 997), (-27, 357, 1)]
Gyro (dps) 9...7.346 (-2.532958984375, 0.6103515625, 1.0528564453125)]
P(mbar), T(C) 9...7.35 1008.09423828125, 27.545833333333334]
where I shortened the values of the first "record" to fit on a single line for clarity.
I'm guessing the first value 946808257.344 and so on is a timestamp, maybe, followed by the three-coordinate values of the named variables?
That would make the numbers of the values match up with the labels. If this is so, let know--I'll wait to make certain know what it is we're actually parsing before actually trying to do so...
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!