필터 지우기
필터 지우기

Fgetl in a while loop.

조회 수: 7 (최근 30일)
Lucas  Buckels
Lucas Buckels 2017년 4월 3일
답변: Walter Roberson 2017년 4월 4일
In the code in the attached picture, does the first fgetl read the first line (Apple) and str2num(fgetl(file) read the second line (65.1)?
  댓글 수: 4
Lucas  Buckels
Lucas Buckels 2017년 4월 4일
I was provided the code to study from and yes I did test it, but I was still confused as to why it works. I am trying to see if that is why this code works so I know for the future.
Lucas  Buckels
Lucas Buckels 2017년 4월 4일
I am still shaky using fgetl

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

답변 (1개)

Walter Roberson
Walter Roberson 2017년 4월 4일
"does the first fgetl read the first line (Apple) and str2num(fgetl(file) read the second line"
Yes.
Question for you: what name is going to be reported if the file is empty?

카테고리

Help CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by