How to extract Numbers from a textfile

4 views (last 30 days)
bear007
bear007 on 26 Oct 2012
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

Answers (1)

Mech Princess
Mech Princess on 26 Oct 2012

Community Treasure Hunt

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

Start Hunting!