10-06-2011 06:21 AM
Slightly strange request, but as I'm stuck, here we go:
I've got a seemingly .csv file that I want to load into LabVIEW2010. The simple "%.;%f" code doesn't work as it can't read the file itself (see attached). I managed to read in the file by using the "read from text file" function which gives me the multi-column data in a string.
I want to divide the data into an numerical array so I can start to use and analyse it. Any suggestions how?
Many thanks!
Patrick
Solved! Go to Solution.
10-06-2011 08:13 AM
Hi Patrick
I stated by converting the text string to a spreatsheet array of strings then isolating the string array containing the raw data for Acc X, Acc Y, Acc Z, Qua x, Qua y, Qua z Qua w. and thus converting all of that to an array of doubles.
If you wish to use the time stamps for your analysis you should do some manipulation to that string column aswell I did not do anything to it since there is not a consistent interval between each timestamp however either way you choose to use it it should be fairly simple to convert that aswell.
I have attached my solution in the zip hope it helps you along 🙂
/Sletten
10-06-2011 08:24 AM
GE_NI_US!
Superb! Can't believe I didn't think of that myself!
Thanks dude!
10-06-2011 08:42 AM - edited 10-06-2011 08:43 AM
The VI can be simplified considerably:
Note: If you only interested in the numerical values, then you can replace the Read From Text File and Spreadsheet String to Array with the single Read From Spreadsheet File VI.
10-07-2011 12:17 AM
Cheers for the post Smercurio
I Have not used the array subset function that much and the convert string to value is usually reverted in my code ;). Again Kudos for the updated information.
/Sletten