Array from text file
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hi! I have a text file that look like the image attached. I need to do an array with all the values between the [ ]. How can I do that?
Many thanks!
1 Comment
Akira Agata
on 20 Jan 2018
Could you upload (or copy&paste) this first 3 lines of your data as a text? That would be helpful for everyone here to find better solution.
Answers (1)
Pawel Jastrzebski
on 19 Jan 2018
0 votes
You can use Matlab import function and then change the import setting to what you need:

- Select output format
- Add Data to your workspace

Or import data using commands, i.e.:
From what I see your data is all numeric so most likely you're going to import is as matrix. To convert matrix to the cell array use:
1 Comment
Ines Domingos
on 19 Jan 2018
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!