Failed to convert character code error

My data is in the form of large .csv files on a USB. My code is on my laptop (with an active Matlab license). I added the USB drive to the path and tried to run my code, however, I get this error: "failed to convert character code". I am not sure what this means in terms of trying to grab data from a USB and run a code on a laptop?

3 comentarios

Mathieu NOE
Mathieu NOE el 8 de Sept. de 2021
hello Elise
have you tried your code if the data is copied to your matlab working directory ? (if it's allowed ?)
Elise Baribault
Elise Baribault el 8 de Sept. de 2021
Hi Mathieu,
I cannot copy the data to my laptop because the file size is too large. Thus I need to have the data on an external drive.
Image Analyst
Image Analyst el 16 de Sept. de 2021
Open it in a text editor. Truncate off all but, say, 500 lines of it, and save it as a new file. Then attach that csv file here with the paperclip icon.

Iniciar sesión para comentar.

Respuestas (3)

Jan
Jan el 8 de Sept. de 2021

0 votos

1 comentario

Elise Baribault
Elise Baribault el 16 de Sept. de 2021
This did not work. I still get the same error with textscan

Iniciar sesión para comentar.

Image Analyst
Image Analyst el 13 de Sept. de 2021

0 votos

What is your code? You forgot to attach it or your data. Use an editor to chop off some rows of your csv text file if it's too big.
Have you tried the legacy csvread() function?
Martin Christian
Martin Christian el 20 de Dic. de 2021

0 votos

super: the "try" does not detect the error !. It will help!

Categorías

Más información sobre Environment and Settings en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 8 de Sept. de 2021

Respondida:

el 20 de Dic. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by