fscanf
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
When i try to read a file, this one:
3.0000000e+000 4.0000000e+000 5.0000000e+000 4.0000000e+000 5.0000000e+000 6.0000000e+000 I get
>> fid=fopen('samematrix.mongiss', 'r')
fid =
4
>> fscanf(fid, '%f%f%f')
ans =
3
4
5
4
5
6
>>
I want to have rows made to columns as it says that fscanf will do.
0 commentaires
Réponse acceptée
Wayne King
le 28 Oct 2011
Hi Tor,
fid=fopen('samematrix.mongiss', 'r')
data = fscanf(fid,'%f');
1 commentaire
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Entering Commands dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!