MATLAB: Problems with fscanf

scanf

[EDIT: Sat May 14 02:19:15 UTC 201 – Reformat – MKF]
Why is this wrong ?
fid = fopen ('dados.txt', 'r');
dados = fscanf(fid, '%g %g', [9 inf]);
fclose (fid);
dados = dados' ;
This is what I have at my "dados" file:
20000 218.66 224.29 222.77 99.42 96.92 97.58 0.81 2.59
… A (3000×9) matrix with numbers like that
And this is what MATLAB suggests :
??? Error using ==> fscanf
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in ==> programa at 2
dados = fscanf(fid, '%g %g', [9 inf]);

Best Answer

Hahaha, sorry, but I found the answer, the guy who has sent me the file saved it as "dados.txt" so the name of the file isnĀ“t only "dados".