I have a column variable normally look like this:
Once in a while the column data will be like this, i.e., composed entiredly of strings that can be converted to numerical values.
When this happens, I want to use str2num to convert them into numerical values first before using writetable to put them into an Excel file. Otherwise, I would see all those yellow diamonds with ! inside next to each row of the column to indicate errors.
So how do I detect if all elements in an entire column can potentially be converted to numerical values?
Also when I treid to use str2num, why am I getting the below error?
Input must be a character vector or string scalar.