Error: Inputs must be character vectors, cell arrays of character vectors, or string arrays.
    10 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Leon
 am 11 Jun. 2025
  
    
    
    
    
    Kommentiert: Star Strider
      
      
 am 11 Jun. 2025
            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 Kommentare
Akzeptierte Antwort
  Star Strider
      
      
 am 11 Jun. 2025
        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 +"]"
.
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

