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 Center および File ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by