Info

此问题已关闭。 请重新打开它进行编辑或回答。

Array from text file

1 次查看(过去 30 天)
Ines Domingos
Ines Domingos 2018-1-19
关闭: MATLAB Answer Bot 2021-8-20
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 个评论
Akira Agata
Akira Agata 2018-1-20
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.

回答(1 个)

Pawel Jastrzebski
Pawel Jastrzebski 2018-1-19
You can use Matlab import function and then change the import setting to what you need:
  1. Select output format
  2. 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 个评论
Ines Domingos
Ines Domingos 2018-1-19
Hi! the problem is that I have more than 16000 lines with data.

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by