How to delete spaces and '[ ', ']' characters from all data array string cells?
显示 更早的评论
I need to remove the spaces and '[', ']' characters from the cells of a data array, I have try with the cellfun function and with:
a(a(1,1)== '[')='' %%where 'a' is the matrix, this case only for the first cell and '[' character
But is not working, How could be done?
Thank you in advance,
采纳的回答
更多回答(1 个)
Azzi Abdelmalek
2013-7-15
a={'',1 ,[],'22'}
a(cellfun('isempty',a))=[]
类别
在 帮助中心 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!