Undefined|Undefined function or method 'xxxxxx' for input arguments of type 'char'.

如果在低版本的Matlab中出现这个报错,在高版本没有出现报错。可能有一种原因。由于极少极少使用Matlab,因此我电脑上只有一个绿化免安装版的Matlab 7.8.0 (R2009a),有次运行时报错了。
目录下有4个文件(为了不暴露自己的文件名,所以随便命名的):
nice to meet you.m
nice_one.m
nice_two.m
nice_three.m
nice to meet you.m中调用了nice_one、nice_two和nice_three三个函数文件。打开nice to meet you.m运行后,就会出现报错“Undefined function or method 'nice' for input arguments of type 'char'.”
假如把“nice to meet you.m”改成“to meet you.m”,报错就应该是“Undefined function or method 'to' for input arguments of type 'char'.”
亲测的案例就是这个,应该只是会在低版本出现的。灵感来源于以下网页:
https://zhidao.baidu.com/question/393669909.html

【Undefined|Undefined function or method 'xxxxxx' for input arguments of type 'char'.】安装目录名字不能包含空格,若安装在C:/program files/matlab目录下,就会发生这种情况。若是安装目录为 C:/matlab,则不会出现这种清苦。楼主试一下。

    推荐阅读