How to read file .txt?
Show older comments
I have file .txt contains
1 2
2 3
I want to read the file and put each value 12 , 23 in a cell array
How can I do that
Please help me.
Thanks
6 Comments
dpb
on 9 Dec 2019
Are the inputs actually separate in the file as shown and you really want them combined as numeric?
Why use a cell array for numeric values?
Mira le
on 9 Dec 2019
Guillaume
on 9 Dec 2019
You haven't answered dpb question. The simplest way to clarify what your input file actually looks like is to attach an example.
Also, please explain why you want the result as a cell array when using a matrix would make everything simpler.
Mira le
on 9 Dec 2019
Adam Danz
on 9 Dec 2019
Mira le
on 9 Dec 2019
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing 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!