Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Matlab reads the data in txt file and saves it as a matrix.
Matlab reads the data in txt file and saves it as a matrix.
1, open a txt file, and you will find that it has both characters and values.

2. At this time, all characters are deleted, leaving only useful data values.

3. Remember the address of this folder, which will be used as the path read by matlab.

4. At this time, use a textread function, which is internally substituted into the txt file path just now.

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