How to put the info of txt file into an array?

2 views (last 30 days)
Hi,
I have a txt file, when you open it you can see this:
0.0e+00,-2
1e-05,4.4
2e-05,4.48
3e-05,5.36
4e-05,5.32
5e-05,5.2
6e-05,5.16
and so on....
I want to put the first numbers (before comma) into an array. And the second numbers (after comma) into another array. How can I do this?
Thanks!

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 10 Jan 2014
dlmread('file.txt')

More Answers (0)

Categories

Find more on Data Types in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!