question on Invalid file identifier

1 visualización (últimos 30 días)
Megan Mirkhanian
Megan Mirkhanian el 20 de Nov. de 2020
Respondida: Srivardhan Gadila el 25 de Nov. de 2020
Hi I keep getting the error Imvalid file identifier. use fopen to generate a valid file identifier.I don’t know what’s wrong, please help! Thank you!
  1 comentario
Geoff Hayes
Geoff Hayes el 20 de Nov. de 2020
Editada: Geoff Hayes el 20 de Nov. de 2020
Megan - can you post the code for the function that loads the file? I think that is the second m-file shown in your screen shot of the editor. I see that you pass in a path and filename of the file to open, but it would be helpful to show the code that opens that file. Also, please copy and paste the full error message.

Iniciar sesión para comentar.

Respuestas (1)

Srivardhan Gadila
Srivardhan Gadila el 25 de Nov. de 2020
Inside your custom function make sure that you obtain the fileID using the fopen function and use it instead of directly using the filename to access the content.
You can look at other MATLAB Answers with the similar issue here: Help Center: Invalid file identifier. Use fopen to generate a valid file identifier.

Categorías

Más información sobre File Operations en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by