How to obtain one cell of output data from multiple cells?

4 次查看(过去 30 天)
Hi! I need to obtain one cell of output data from multiple cells (actually around 100) inside another cell.
The cell containing the data output cells looks like this:
Utmetar =
{1255x1 cell}
{1487x1 cell}
{1447x1 cell}
{1464x1 cell}
{1433x1 cell}
{1500x1 cell}
...and so on
and I would like the output cell to look something like this:
Utmetar =
{9234x1 cell}
How can this be done in a simple manner? When I do it manually it looks like this:
flygplatsmetar=[Utmetar{1};Utmetar{2};Utmetar{3};Utmetar{4}]
I need help doing this iteratively because of the many cells. My output should look like this and sorted into a single cell if that is possible.
'METAR ESDF 200807312220Z AUTO 00000KT 9999NDV NCD 15/14 Q1021'
'METAR ESDF 200807312250Z AUTO 00000KT 9999NDV NCD 14/13 Q1021'
'METAR ESDF 200807312320Z AUTO 00000KT 9999NDV NCD 14/13 Q1020'
'METAR ESDF 200807312350Z AUTO 02002KT 9999NDV NCD 14/13 Q1020'
I posted a question earlier about the same topic but the answer unfortunately didn't help me much. Please can anybody help with this?

采纳的回答

Massimo Zanetti
Massimo Zanetti 2016-10-7
编辑:Massimo Zanetti 2016-10-7
Very simple. Try this:
%this is a simple version of you set of cells
U = { cell(3,1) ; cell(2,1) ; cell(4,1) }
%here you concatenate them and put them into a cell
B = {cat(1,U{:})}

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by