How to extract Numbers from a textfile

1 回表示 (過去 30 日間)
bear007
bear007 2012 年 10 月 26 日
Hi there, currently I get from measurements textfiles with timing results. The content of each textfile looks like this:
# [0] Min, [1] Avg, [2] Max, [3] Std. Dev
Times 137.849us 148.408us 460.475us 23.0206us
I would like to read the values from this textfile into an array, such as:
times = [0.1378e-003 0.1484e-003 0.4605e-003 0.0230e-003];
I know that it works somehow with fscanf, but it won't work, when I try it. Does anyone have a idea to help me with this? Thanks a million in advance! Martin

回答 (1 件)

Mech Princess
Mech Princess 2012 年 10 月 26 日

カテゴリ

Help Center および File ExchangeData Import and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by