我似乎陷入了Kafka-land,带有一个我似乎无法在MATLAB函数中使用的java.lang.String:
K>> name name = Jason K>> sprintf('%s', name) ??? Error using ==> sprintf Function is not defined for 'java.lang.String' inputs. K>> ['my name is ' name] ??? Error using ==> horzcat The following error occurred converting from char to opaque: Error using ==> horzcat Undefined function or method 'opaque' for input arguments of type 'char'.
如何将java.lang.String转换为常规MATLAB字符数组?
Matlab不知道如何使用任何东西,除了它自己的结构.
将字符串转换为char:
cName = char(name);