Merge a row to a single cell

2 visualizzazioni (ultimi 30 giorni)
Sahar khalili
Sahar khalili il 20 Lug 2021
Commentato: Sahar khalili il 20 Lug 2021
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 Commenti
Scott MacKenzie
Scott MacKenzie il 20 Lug 2021
That looks like a spreadsheet, not a cell array in MATLAB. Please clarify what your question is.
Sahar khalili
Sahar khalili il 20 Lug 2021
Sorry I thought it was obvious

Accedi per commentare.

Risposta accettata

Stephen23
Stephen23 il 20 Lug 2021
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'}

Più risposte (0)

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by