How to reference entire substring as a string?
1 view (last 30 days)
Ted Baker on 27 Nov 2019
I have an array of strings in a 4x1 cell format, called textarr, as below:
I would like to remove the .exe, so I initially tried:
textarr(4) = textarr(4)(1:end-4);
But Matlab did not like the double brackets on the right hand side.
I then tried a method using a temporary variable, like:
lasttemp = textarr(4);
lasttemp = lasttemp(1:end-4);
But this just results in lasttemp becoming a 1x0 cell...
I suspect I am confusing the String itself with elements of a string array. How can I address a String inside a specific element of an array?