splitting cell array consists of string and numeric characters

1 次查看(过去 30 天)
I have a cell array (n x 1). Each cell looks something like this:
* 2021 3 29 0 0 0.00000000
I need to remove * from each cell and split the cell array into 6 columns consist of double values. For example;
2021 3 29 0 0 0
2021 3 30 0 0 0
.
.
.
How I can do that?

采纳的回答

Wan Ji
Wan Ji 2021-8-26
编辑:Wan Ji 2021-8-26
Use replace
S = {...}; % your n*1 cell array
S = arrayfun(@(i)replace(S{i},'*',''),1:1:numel(S),'uniform',false);
  9 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by