reading a particular value from a textfile

조회 수: 2 (최근 30일)
Siddharth
Siddharth 2013년 5월 29일
hi,
how can i read the data in the mth row and nth column of a textfile? i used this to store the data in an array:
fid = fopen ('\sample.txt'); c=fscanf (fid, '%g%g');
thanks.

채택된 답변

Thomas
Thomas 2013년 5월 29일
편집: Thomas 2013년 5월 29일
To read the data in mth row in th column of variable c use
fid = fopen ('\sample.txt');
c=fscanf (fid, '%g%g');
c(m,n)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Text Data Preparation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by