Borrar filtros
Borrar filtros

Data from multiple cells into one cell

5 visualizaciones (últimos 30 días)
Linus Dock
Linus Dock el 7 de Oct. de 2016
Comentada: Linus Dock el 7 de Oct. de 2016
Hi! I have a number of cells with data in multiple rows of strings that I would like to merge into one cell. If I would do it manually it would look like this:
UtData=[Utmetar{1};Utmetar{2}]
But the number of cells is about 100 and increasing with time so I would like to do this iteratively. Is there a way of doing this in a loop or in any other way?
The output from the cell
Utmetar{1} looks like this:
'METAR ESDF 200808311920Z 10008KT 9999 BKN037 14/10 Q1022'
'METAR ESDF 200808311950Z 09005KT 9999 FEW034 14/10 Q1022'
'METAR ESDF 200808312020Z 09003KT 060V130 CAVOK 13/10 Q1022'
'METAR ESDF 200808312050Z AUTO 09003KT 9999NDV NCD 12/09 Q1022'
... and so on
And Utmetar looks like this at the moment:
Utmetar =
Columns 1 through 5
{1255x1 cell} {1487x1 cell} {1447x1 cell} {1464x1 cell} {1433x1 cell}
Column 6
{1500x1 cell}

Respuestas (1)

uu tsi
uu tsi el 7 de Oct. de 2016
I think you can use end + 1
ex:
a = {}
while true
a{end + 1} = rand(randi(5))
end
  1 comentario
Linus Dock
Linus Dock el 7 de Oct. de 2016
Hi, I can't get this to function properly, is there any other way?

Iniciar sesión para comentar.

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by