フィルターのクリア

textscan does not output more than 4 decimal digits

5 ビュー (過去 30 日間)
Krzysztof Fajst
Krzysztof Fajst 2011 年 5 月 30 日
I have a comma delimited file and trying to read it using textscan
2011.02.25 8:04 1.38273 1.38309 1.38269 1.38307 71
fid = fopen(fullname);
out = textscan(fid, '%s %s %f %f %f %f %f %f', 'delimiter', ',', 'MultipleDelimsAsOne', 1);
fclose(fid);
However it always outputs me 4 decimal digits not 5 as in file even if i use format like e.g. %7.5f where it sholud output 5 digits
Any idea ??
  1 件のコメント
Oleg Komarov
Oleg Komarov 2011 年 5 月 30 日
http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer for additional resource next time look in the list of links.

サインインしてコメントする。

採用された回答

Oleg Komarov
Oleg Komarov 2011 年 5 月 30 日
You're being fooled by the display format. Type in the command line (or access the var from the var editor):
format long
out{:,3}
  1 件のコメント
Krzysztof Fajst
Krzysztof Fajst 2011 年 5 月 30 日
Thanks, Krzysztof

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeText Data Preparation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by