 |
String Length - MATLAB Answers - MATLAB Central
Your input variable is a cell array. Each string is an element in that cell array and so length reports 2, because you have 2 elements. If you do length(string(1)) then you still try to access the cell element itself rather than its content. However, if y
www.mathworks.com |
 |