How to read only 1 value in row 2, column 1 ?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Matlaber
am 14 Feb. 2019
Kommentiert: Matlaber
am 15 Feb. 2019
I just want to read one value in my csv file.
For example:
filename = 'csvlist.dat';
M = csvread(filename)
result is
M =
2 4 6 8
3 6 9 12
5 10 15 20
7 14 21 28
Example 2:
M = csvread('csvlist.dat',1,0,[1,0,2,2])
Result:
M =
3 6 9
5 10 15
If, I want to read only value "4" which is located in row 1, columm 2, how can I do that?
Is there any function beside "csvread"?
Thanks
0 Kommentare
Akzeptierte Antwort
Mark Sherstan
am 14 Feb. 2019
Try one of these three methods: https://www.mathworks.com/matlabcentral/answers/45149-read-certain-range-of-csv-file#answer_55368
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Data Import and Analysis 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!