Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to read txt text data by matlab

Shulou Source: shulou.com Published: 2022-06-02 17:47:05 10月04日 Update

This article mainly introduces how matlab reads txt text data, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

Matlab method to read txt text data: first open a txt file and keep the address of the folder; then use a textread function to replace the path of the txt file inside the function; finally, you can get the xy graphics by drawing.

The method of reading txt text data by matlab:

1. Open a txt file and we will find that it has both characters and values.

2. At this point, we delete all the characters, leaving only useful data values.

3. Remember the address of the folder, which will be used as a path for matlab reading.

4. At this time, a textread function is used to replace the path of the txt file inside the function.

5. The textread function is stupid and will read the data as 1 as a vector. We divide it into two columns, represented by x and y.

6. Finally, you can get the graph of xy by drawing, so this method is simple and effective.

Thank you for reading this article carefully. I hope it is helpful for everyone to share how matlab reads txt text data. At the same time, I also hope you can support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

Tags: Data files functions text methods articles paths graphics addresses characters values folders drawings valid representatives values fools content and at the same time vectors Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Microsoft MariaDB Apple Xiaomi