How to delete specific text from multiple cell in a column ?
2 次查看(过去 30 天)
显示 更早的评论
Hi!
I have the following column :
21.15 (cd)
42.12 (cd)
24.45 (cd)
..............
It must show like this, without brackets and text :
21.15
42.12
24.45
..............
Thanks in advance guys !
0 个评论
采纳的回答
madhan ravi
2020-6-13
编辑:madhan ravi
2020-6-13
c = {'21.15 (cd)';...
'42.12 (cd)';...
'24.45 (cd)'};
func = @(x) sscanf(c{x},'%f');
Wanted = arrayfun(func,1:numel(c)).'
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!