Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Array from text file
1 回表示 (過去 30 日間)
古いコメントを表示
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
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
2018 年 1 月 19 日
You can use Matlab import function and then change the import setting to what you need:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/181199/image.png)
- Select output format
- Add Data to your workspace
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/181200/image.png)
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 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!