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 commentaires

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.
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 le 24 Juil 2016
Modifié(e) : per isakson le 24 Juil 2016
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? )
AE would be a column reference in Excel, with 2925 to 2952 being the row numbers in that column.

Connectez-vous pour commenter.

Réponses (1)

Varun Gunda
Varun Gunda le 2 Août 2016

0 votes

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.

Catégories

Question posée :

le 12 Juil 2016

Community Treasure Hunt

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

Start Hunting!

Translated by