MATLAB error: “Undefined function or method 'time' for input arguments of type 'char'”

I wrote a modular MATLAB code which consists of several function files. I have no problem running my program. The problem is that once I try the code in debugging mode, I get the following error: "Undefined function or method 'time' for input arguments of type 'char'"
I don't understand what I did wrong.
I will appreciate your help.

6 comentarios

More details please.
  • Full error message.
And code.
Is it "time" or is it "times" ?
4th file (out of 4)

Iniciar sesión para comentar.

 Respuesta aceptada

M B
M B el 6 de Mzo. de 2014
I found the problem!
The name of the first file consists of whitespaces. MATLAB file names must NOT include whitesapces!
Still, I think that MATLAB should give an error saying that file name is illegal. The existing message can't help anyone who encountered such a problem.

1 comentario

Thanks M B, This is exactly the same problem that I had. Like what you said there should not be any white space included.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre File Operations en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

M B
el 6 de Mzo. de 2014

Comentada:

el 7 de Nov. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by