- Make sure the file has correct extension (“.Poly5” in this case).
- Avoid spaces in the file names. Use underscores ('_') of camel case to separate the words if needed.
- Avoid using special characters. Using dot ('.') in the file name can change the extension of the file or using a slash ('/') can change the path of the file.
- Ensure that the file path is correct and that the renamed file is in the MATLAB current folder or in a folder on the MATLAB path.
- Try using the absolute path instead of the relative path to the file. Use the MATLAB's "fullfile" function for creating the path to the file.
problems with reading after renaming .Poly5 file
2 views (last 30 days)
Show older comments
Hi,
We collected data from the EMG. We saved the data as a Poly.5 file. when i want to read the data i use this line in matlab; TMSi.Poly5.read('EMG_2022_04_28_15_19_02.Poly5'); everything works fine until i change the name of the Poly5 file. when i use the same line with the new name, matlab says cant open the file with error: this is not a poly5 file. I hope you can help me with this problem. thanks in advance!
Nigel Moos
0 Comments
Answers (1)
Milan Bansal
on 22 Dec 2023
Hi nigel moos
I understand that you are facing an error when trying to read a renamed “.Poly5” file using MATLAB and the “TMSi.Poly5.read” function, which results in a message stating that it is not a “.Poly5” file.
The error generally occurs when the extension of file changes when renaming the file or the file is not available in a folder on the MATLAB path. Following are the best practices for renaming and reading a file in MATLAB.
Refer to the documentation to learn more about "fullfile" function.
Hope it helps!
0 Comments
See Also
Categories
Find more on Data Import and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!