Removing char in a mixed string column so only numerical values are left?
Mostrar comentarios más antiguos
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.

2 comentarios
madhan ravi
el 9 de Sept. de 2019
Attach your data as .mat file.
Sofie Lund
el 9 de Sept. de 2019
Respuesta aceptada
Más respuestas (2)
madhan ravi
el 9 de Sept. de 2019
Editada: madhan ravi
el 9 de Sept. de 2019
Wanted = str2double(regexprep(LED,'LED',''))
% ^^^--- is your columns of data containing mixed data
1 comentario
Sofie Lund
el 9 de Sept. de 2019
Fabio Freschi
el 9 de Sept. de 2019
Check erease
erease(yourString,'LED');
Categorías
Más información sobre Tables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!