read large csv File and export specific Values

Hello,
I want to read a large csv-File with mixed Datatype and then Export specific values.I uploaded the csv i need to import and i need the values: A2925-A2952, F2925-F2952, AE2925-AE2952
can anyone help? thanks a lot!

4 件のコメント

Robert Fennis
Robert Fennis 2016 年 7 月 12 日
Its quite a burdon because of the sheer size of the file. Can't you simply open it in excel and use the ';' as a separator symbol? I advice to first delete all the information that you don't need to speed up the processs. You could use Notepad++ or Excel to speed up this process.
hdiba
hdiba 2016 年 7 月 12 日
Unfortunately I have a lot of files (over 5000) so its quite difficult to edit all the files. I already wrote a code to read the data, do u have an idea how to export the values?
clear all;
cd('C:\Users\Samsung\Desktop\diba masterarbeit\JS');
liste=dir('*.csv');
l=length(liste);
gesamtIndex=0;
data=cell(1,l);
for lauf=1:l
gesamtIndex=gesamtIndex+1;
fileID = fopen([liste(lauf).name]);
formatSpec=repmat('%s', 1, 300);
data{gesamtIndex}=textscan(fileID, formatSpec, 'Delimiter', ';');
fclose(fileID);
M=[data{gesamtIndex}{:}];
end
per isakson
per isakson 2016 年 7 月 24 日
編集済み: per isakson 2016 年 7 月 24 日
The rows 2925 through 2952 constitutes the block of data under the header, which starts with the string
"Typ";"Simulationstyp";"IDRechenlauf";"ID";"Jahr";"Bezeichnung";"Nein"
There is only one header starting with that string. I think it would be more robust to use the headers than the row numbers. The same goes for the column headers. (Does AE refer to the English alphabet? )
Walter Roberson
Walter Roberson 2016 年 7 月 24 日
AE would be a column reference in Excel, with 2925 to 2952 being the row numbers in that column.

サインインしてコメントする。

回答 (1 件)

Varun Gunda
Varun Gunda 2016 年 8 月 2 日

0 投票

It is my understanding that you want to read large csv-file with mixed datatype and export specific values.
You can do this by using “csvread” function in matlab. Refer the following document for more information.

カテゴリ

ヘルプ センター および File ExchangeData Import from MATLAB についてさらに検索

質問済み:

2016 年 7 月 12 日

回答済み:

2016 年 8 月 2 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by