How to read only 1 value in row 2, column 1 ?

2 vues (au cours des 30 derniers jours)
Matlaber
Matlaber le 14 Fév 2019
Commenté : Matlaber le 15 Fév 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"?
ffffff.PNG
Thanks

Réponse acceptée

Mark Sherstan
Mark Sherstan le 14 Fév 2019
  1 commentaire
Matlaber
Matlaber le 15 Fév 2019
Thanks. That is very useful of 3 different method.

Connectez-vous pour commenter.

Plus de réponses (1)

madhan ravi
madhan ravi le 14 Fév 2019
M = dlmread('csvlist.dat',',',[0,1,0,1])

Catégories

En savoir plus sur Data Import and Analysis dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by