MATLAB: How to convert all the cell in a columns from char to string
charstringstable
I have a table that contains char columns and double columns. I want to keep the same format but convert all the char into string to do some operation after.
'ABc' 'XYZ'
To : "ABC" "XYZ"
Best Answer
Hum! it's not actually that easy as you can't use the syntaxyourtable(:, somecolumns) to change the type of the column from cell array to string.
Option 1: use . indexing over the char columns
for columnname = yourcharcolumnnames %where yourcharcolumnnames is a cell array of the char column names
Best Answer