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

조회 수: 2 (최근 30일)
Matlaber
Matlaber 2019년 2월 14일
댓글: Matlaber 2019년 2월 15일
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

채택된 답변

Mark Sherstan
Mark Sherstan 2019년 2월 14일
  댓글 수: 1
Matlaber
Matlaber 2019년 2월 15일
Thanks. That is very useful of 3 different method.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

madhan ravi
madhan ravi 2019년 2월 14일
M = dlmread('csvlist.dat',',',[0,1,0,1])

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by