MATLAB: Removing char in a mixed string column so only numerical values are left

charextract dataextract valuemixed stringnumericalplotplottingquotation marksremove charactertable

I am trying to plot some data, but one of the columns I need has been imported with quotation marks around it (see below).
In order to plot this data I also need to get rid of the LED part in each row – how do I edit this matrix to only include the numerical values? I have apprx. 220 rows of data.
Thank you.

Best Answer

If ‘LEDS’ is a cell array, try this:
LEDS = {'LED114'; 'LED2'; 'LED49'};
LED_Nrs = regexp(LEDS, '\d*', 'match')
Out = str2double([LED_Nrs{:}])'
producing:
Out =
114
2
49