フィルターのクリア

What is the syntax of fscanf? Suppose a.dat contains the float numbers 1 and 2. Write the commands to read the numbers to f1 and f2?

1 回表示 (過去 30 日間)
What is the syntax of fscanf? Suppose a.dat contains the float numbers 1 and 2. Write the commands to read the numbers to f1 and f2?

採用された回答

Walter Roberson
Walter Roberson 2014 年 2 月 10 日
編集済み: Walter Roberson 2014 年 2 月 10 日
T = fscanf(fid, '%f%f', 2);
f1 = T(1);
f2 = T(2);
or
f1 = fscanf(fid, '%f', 1);
f2 = fscanf(fid, '%f', 1);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT-Files についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by