How can i read 14,000 data points from a file?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Ruby
il 12 Feb 2014
Commentato: Walter Roberson
il 13 Feb 2014
i read the datapoints by using importdata... but this is not suited for large number of data points....i have to design a notch filter with this data....so i have to read 14000 data points from a file.... what i have to do??
4 Commenti
Walter Roberson
il 12 Feb 2014
How many columns per line? What separator between columns? Are there any headers? What would a typical line look like?
Risposta accettata
Walter Roberson
il 12 Feb 2014
fid = fopen('YourFile.txt');
datacell = textscan(fid, '%f%f', 14000, 'CollectOutput', 1);
fclose(fid);
youdata = datacell{1};
3 Commenti
Walter Roberson
il 13 Feb 2014
This is the reason I asked about the file format.
fid = fopen('YourFile.txt'); datacell = textscan(fid, '%*f%f%f%*f%*f%*f%*f', 14000); fclose(fid); A = datacell{1}; B = datacell{2}; C=A-B;
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Large Files and Big Data in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!