Borrar filtros
Borrar filtros

problems with reading after renaming .Poly5 file

2 visualizaciones (últimos 30 días)
nigel moos
nigel moos el 13 de Mayo de 2022
Respondida: Milan Bansal el 22 de Dic. de 2023
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

Respuestas (1)

Milan Bansal
Milan Bansal el 22 de Dic. de 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.
  • 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.
Refer to the documentation to learn more about "fullfile" function.
Hope it helps!

Categorías

Más información sobre Data Import and Analysis en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by