splitting cell array consists of string and numeric characters

조회 수: 1 (최근 30일)
sermet OGUTCU
sermet OGUTCU 2021년 8월 26일
댓글: sermet OGUTCU 2021년 8월 26일
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
Wan Ji
Wan Ji 2021년 8월 26일
You may see n*6 cell is not so good at all compared with DT or DV
sermet OGUTCU
sermet OGUTCU 2021년 8월 26일
Thank you very much for the solution.

댓글을 달려면 로그인하십시오.

추가 답변 (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