How can I import a single row from text file?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Laxmikant Radkar
am 8 Aug. 2018
Bearbeitet: Donato Foggetti
am 8 Aug. 2018
I have a file which contains 1000 rows and 6908 column. It looks like this
3.490693e-02 3.604404e-02 3.532657e-02 8.249564e-05 8.572962e-05 8.369483e-05 3.631958e-05 3.830521e-05 3.705194e-05 1.016112e-04 1.060492e-04 1.032492e-04 4.740712e-05 4.949185e-05 4.817630e-05 1.0.....................
How Can i just import this line. At the later stage I need to plot the graphs. When I use importdata workspace, in value column, double/cell. Where should I get more information about this?
Thank you for the help
1 Kommentar
dpb
am 8 Aug. 2018
Which row, specifically?
In general it's much simpler and probably faster to read the full file and do whatever selection is desired in memory.
Akzeptierte Antwort
Donato Foggetti
am 8 Aug. 2018
Bearbeitet: Donato Foggetti
am 8 Aug. 2018
In these cases, I usually import the data into an Excel spreadsheet (the procedure is 99% automatic), then I import everything in MATLAB from the *.xlsx file: you can choose which rows and columns have to be imported and the type of variable. You can also automatically generate a script or function so that this procedure will be done just the first time.
I hope to have been helpful.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!