dealy in reading matrix

조회 수: 1 (최근 30일)
Oday Shahadh
Oday Shahadh 2021년 1월 18일
댓글: Ive J 2021년 1월 18일
Hi all,
I need some way to read each row of a matrix every real second, pls help
Thanks
  댓글 수: 2
Jan
Jan 2021년 1월 18일
Where is this matrix stored in which format? "Read each row" is not clear enough yet.
Ive J
Ive J 2021년 1월 18일
If your matrix is already in workspace (which I doubt):
for i = 1:size(A, 1)
myRow = A(i, 1);
pause(1) % 1 sec delay
% do blah blah
end
If it's stored in a text file, you can read it by readmatrix. Otherwise for I/O, see fgetl.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by