フィルターのクリア

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 Center および File ExchangeSearch Path についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by