Error Message dataread and textread

Please could anyone help understand this error:
Error using *dataread*
Trouble reading floating point number from file (row1, field2) ==> Desktop\Sub
Error in *textread*
[varargout{1:nlhs}]=dataread('file'vararing{:}); %#ok<REMFF1>

Respuestas (2)

Jeremy Hughes
Jeremy Hughes el 9 de En. de 2018

1 voto

Hi George
TEXTREAD is trying to import numeric data but encountering text fields which cannot be converted. Basically, your file contains the text "Desktop" where textread is expecting a number.
Also, to quote the doc "Note: textread is not recommended. Use textscan instead." Which might be what you need to do, but I can't really say.
You may want to re-post a question that includes:
  • What you're trying to do
  • A sample of the file you're trying to read
  • The code for what you've tried so far
Jeremy

2 comentarios

sai pradeep
sai pradeep el 2 de Jul. de 2019
Hi hughes,
I am trying to calculate particle displacements from my model.
I have been using following syntax out of which I get the error as attached.
***************************************************************************
Error using dataread
Trouble reading floating point number from file (row 1, field 2) ==> \1.SUBROUTINES\geoPIV_RG.exe\n
Error in textread (line 168)
[varargout{1:nlhs}]=dataread('file',varargin{:}); %#ok<REMFF1>
Error in geoPIV_RG_run
***********************************************************************
while I am running the command
geoPIV_RG_run('CP_Example_analysis_launcher');
Thanks in advance
Penglin Li
Penglin Li el 18 de Mayo de 2022
Have you solved the problem now? I meet the problem too.

Iniciar sesión para comentar.

Ghaem Zamani
Ghaem Zamani el 16 de Sept. de 2022

0 votos

Hello Penglin and Jeremy,
Have you got any solution of this? I have similar problem while running GeoPIV_RG.

1 comentario

Penglin Li
Penglin Li el 7 de Nov. de 2022
yes. I have solved this problem. You can check whether your file address have blank space or Chinese.

Iniciar sesión para comentar.

Categorías

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

Preguntada:

el 9 de En. de 2018

Comentada:

el 7 de Nov. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by