Merge a row to a single cell

조회 수: 1 (최근 30일)
Sahar khalili
Sahar khalili 2021년 7월 20일
댓글: Sahar khalili 2021년 7월 20일
Hi,
I have a cell like this:
A=['1' '2' ':' '5' '7' ':' '0' '0'
'1' '2' ':' '5' '7' ':' '0' '0'
'1' '2' ':' '5' '7' ':' '0' '0'
'1' '2' ':' '5' '7' ':' '0' '0'];
and I want to merge every row to a single one to get this:
[ 12:57:00
12:57:00
12:57:00
12:57:00 ]
Does anyone know how can i do so?
  댓글 수: 4
Scott MacKenzie
Scott MacKenzie 2021년 7월 20일
That looks like a spreadsheet, not a cell array in MATLAB. Please clarify what your question is.
Sahar khalili
Sahar khalili 2021년 7월 20일
Sorry I thought it was obvious

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

채택된 답변

Stephen23
Stephen23 2021년 7월 20일
C = {...
'1' '2' ':' '5' '7' ':' '0' '0'
'1' '2' ':' '5' '7' ':' '0' '0'
'1' '2' ':' '5' '7' ':' '0' '0'
'1' '2' ':' '5' '7' ':' '0' '0'};
D = join(C,'',2)
D = 4×1 cell array
{'12:57:00'} {'12:57:00'} {'12:57:00'} {'12:57:00'}
  댓글 수: 1
Sahar khalili
Sahar khalili 2021년 7월 20일
Thanks a lot. It works properly.

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

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