Error: Inputs must be character vectors, cell arrays of character vectors, or string arrays.
7 次查看(过去 30 天)
显示 更早的评论
Here is an example of my Variable A:
A=
"33RO30160505"
"33RO30160507"
"33RO30160508"
isstring(A) = 1.
However, I keep getting the error below:
Error using string/strcat (line 33)
Inputs must be character vectors, cell arrays of character vectors, or string arrays.
Error in initialLoading (line 196)
L2 = strcat('CODE: [', A(1), ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Does anyone know what is going on here?
0 个评论
采纳的回答
Star Strider
2025-6-11
I am not certain what result you want, however for string arrays, you can just use arithmetic operators.
Try this --
A = ["33RO30160505"
"33RO30160507"
"33RO30160508"];
L2 = "CODE: [" + A +"]"
.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!