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 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Tucker Russ
am 10 Feb. 2014
Kommentiert: Tucker Russ
am 10 Feb. 2014
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?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 10 Feb. 2014
Bearbeitet: Walter Roberson
am 10 Feb. 2014
T = fscanf(fid, '%f%f', 2);
f1 = T(1);
f2 = T(2);
or
f1 = fscanf(fid, '%f', 1);
f2 = fscanf(fid, '%f', 1);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Workspace Variables and MAT-Files finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!