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 件のコメント

per isakson
per isakson 2014 年 3 月 6 日
More details please.
  • Full error message.
Walter Roberson
Walter Roberson 2014 年 3 月 6 日
And code.
Is it "time" or is it "times" ?
M B
M B 2014 年 3 月 6 日
1st file (out of 4)
M B
M B 2014 年 3 月 6 日
2nd file (out of 4)
M B
M B 2014 年 3 月 6 日
3rd file (out of 4)
M B
M B 2014 年 3 月 6 日
4th file (out of 4)

サインインしてコメントする。

 採用された回答

M B
M B 2014 年 3 月 6 日

2 投票

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 件のコメント

Smruti Ranjan Jena
Smruti Ranjan Jena 2016 年 11 月 7 日
Thanks M B, This is exactly the same problem that I had. Like what you said there should not be any white space included.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink についてさらに検索

タグ

質問済み:

M B
2014 年 3 月 6 日

コメント済み:

2016 年 11 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by