How to remove numbers from a cell array

I have a cell array which its elements contain both number and characters.
["LAN310"]
["SHA550"]
["SHA430"]
["SHB331"]
["EDU110"]
["IFE101"]
["BSM110"]
["BSM310"]
["BSM540"]
["LAN121"]
["LAN330"]
["IFE151"]
["IFE111"]
["BSM170"]
["BSM320"]
["BSM550"]
["LAN132"]
["SHB492"]
["EDU251"]
["IFC130"]
["IFC170"]
["CCT891"]
["IFC291"]
["IFC121"]
["BSM191"]
["SHB451"]
["TAM160"]
["EDU210"]
["IFC180"]
["IFC150"]
["IFC161"]
["IFC200"]
["IFC301"]
["EDU220"]
["EDU180"]
["IFC431"]
["IFC240"]
["IFC250"]
["IFC311"]
["IFC210"]
["IFC190"]
["TAM111"]
["EDU820"]
["IFC441"]
["IFC353"]
["IFC260"]
["IFC421"]
["IFC411"]
["BSM790"]
["SHB242"]
["EDU261"]
["EDU201"]
["IFC451"]
["IFC224"]
["IFE130"]
["IFC373"]
["IFC363"]
["IFC461"]
["IFC330"]
["BSM461"]
["IMA262"]
I want to remove the " and numbers from my cell and I want the characters to remain only so it becomes like this :
[LAN]
[SHA]
[SHA]
[SHB]
[EDU]
[IFE]
[BSM]
[BSM]
[BSM]
[LAN]
[LAN]
[IFE]
[IFE]
[BSM]
[BSM]
[BSM]
[LAN]
[SHB]
[EDU]
[IFC]
[IFC]
[CCT]
[IFC]
[IFC]
[BSM]
[SHB]
[TAM]
[EDU]
[IFC]
[IFC]
[IFC]
[IFC]
[IFC]
[EDU]
[EDU]
[IFC]
[IFC]
[IFC]
[IFC]
[IFC]
[IFC]
[TAM]
[EDU]
[IFC]
[IFC]
[IFC]
[IFC]
[IFC]
[BSM]
[SHB]
[EDU]
[EDU]
[IFC]
[IFC]
[IFE]
[IFC]
[IFC]
[IFC]
[IFC]
[BSM]
[IMA]
Can someone please guide me how to do this?
Thanks

5 comentarios

madhan ravi
madhan ravi el 9 de Jun. de 2020
Was that really necessary to remove the question after 2 years?
Codemaster
Codemaster el 9 de Jun. de 2020
Hello, my question had some data that were not supposed to be posted and I was recently noticed about that. I tried to delete my question but unfortunately there is not an option to do so. If there is a way to proceed on deleting this thread kindly let me know.
Stephen23
Stephen23 el 9 de Jun. de 2020
Editada: Stephen23 el 13 de Oct. de 2020
@Raad Shariat: when you post anything on MATLAB Answers it is under the following Terms of Use:
It clearly states that you licensed your contributions under the Creative Commons Attribution Share Alike 3.0 license. By accepting those Terms of Use you gave permision to everyone to copy, alter, and distribute your contribution, as long as they follow the requirements of that license. For two years anyone could have done that.
This page has likely already been archived by various bots that copy MATLAB Answers, so I doubt that you can remove that data from the internet.
Codemaster
Codemaster el 9 de Jun. de 2020
Thank you so much Stephen for clearing that out. Yes I am aware of the terms of use, that's why I was looking for an alternate to delete this thread entirely eventhough some time has passed by. Nevertheless it was very nice of you to spend your time on reminding me them! I wish you best of luck
Rena Berman
Rena Berman el 12 de Oct. de 2020
(Answers Dev) Restored edit

Iniciar sesión para comentar.

 Respuesta aceptada

Stephen23
Stephen23 el 24 de En. de 2018
Editada: Stephen23 el 24 de En. de 2018
A trivial implementation using regexprep:
D = regexprep(C,'[\d"]','');
And tested:
>> C = {'["LAN310"]';'["SHA550"]';'["SHA430"]';'["SHB331"]';'["EDU110"]', ... };
>> D = regexprep(C,'[\d"]','');
>> D{:}
ans = [LAN]
ans = [SHA]
ans = [SHA]
ans = [SHB]
ans = [EDU]
... etc

Más respuestas (0)

Categorías

Más información sobre Instrument Control Toolbox Supported Hardware en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 24 de En. de 2018

Editada:

el 13 de Oct. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by