Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
高级会员
注册日期: 2019-11-21
帖子: 3,006
声望力: 66 ![]() |
![]()
我似乎被卡夫卡国困住了,但我似乎无法在MATLAB函数中使用它:
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); 更多&回答... |
![]() |
![]() |