![import.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/217894/image.png)
Import Text Data As a Numeric Matrix with Specific Delimiters
2 ビュー (過去 30 日間)
古いコメントを表示
I need to import a text file as a Numeric Matrix, I have been using the "Import Data" then using Semicolon (;) and a custom delimiter (=) but obviously is time consuming, is there any other way to import the data in a faster and easier way?
An example of the text file is attached and a picture of what I'm trying to get if it helps.
Thanks in advance!!
![Picture.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/217888/Picture.png)
0 件のコメント
採用された回答
Erivelton Gualter
2019 年 5 月 3 日
I am not sure about older versions of Matlab, but for R2018b you can import data by clicking with the right button in the mouse and then press import data. Additionally, you can genereta a script using this functionallity.
You might check the following image.
![import.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/217894/image.png)
Also, I am attaching the generated script.
Make sure to change the file name in the line 12. It must be the full path.
filename = 'C:\Users\Erivelton\Documents\MATLAB\ANSWERS\200 61067191 test.txt';
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!