I have a CSV file, I want to look for example to read this file and to calculate some pre-queue on each line Is that line useful for me and if yes, I save it in a new CSV file. Can someone give me an example? . More information is how it looks like your data: (string, float, float) number coordinates
ABC, 51.9358183333333,4.183255 ABC, 51.9353866666667,4.1841 ABC, ABC 51.9351716666667,4.184565 , 51.9343083333333,4.186425 ABC, 51.9343083333333,4.186425 ABC, 51.9340916666667,4.18688333333333
basically I save more than 50 or 50 from a new file.The string field that lines Want to be copied also thanks
In it can be used to accomplish this. After placing a file 'input_file.csv'
your sample data above, you set an example for those who can get the numeric values, text values, and raw data file with three output in the following manner From:
& gt; & Gt; [NumData, textData, rawData] = xlsread ( 'input_file.csv') numData =% # an array of numerical values from the file 51.9358 4.1833 51.9354 4.1841 51.9352 4.1846 51.9343 4, 1864 51,9343 4,1864 51,9341 4,1869 textData =% # a cell wire array file 'ABC' 'ABC' 'ABC' 'ABC' 'ABC' to the text value of ABC 'rawData =% # a all data (numeric and text) 'ABC' of file cell array [51.9358] [4.1833] 'ABC' [51.9354] [4.1841] 'ABC' [51.9352] [4.1846] 'ABC' [51.9343] [4.1864] ABC '[51.9343] [4.1864]' ABC '[51.9341] [4.1869]
Whatever you can demonstrate is processed You need to save a subset of the data lines to a new file on numerical data, use. Here is an example:
index = sqrt (sum (numdata. ^ 2,2))> = 50; Find the #% rows where the point is% # at the distance of 50 or more% of the original xlswrite ('output_file.csv', rawData (index, :)); Type% # those lines in a new file
Comments
Post a Comment