Separating a column in two others when there are empty cells

1 次查看(过去 30 天)
Guys,
I have the following cell Column
' '
'4W231108'
'4W211208'
'4W180109'
'4W150209'
'4W150309'
'4W120409'
AS you can see the first element of the above column is empty
and I want to obtain Column 1 column 2
“ ” ““
'4W 231108'
'4W 211208'
'4W 180109'
'4W 150209'
'4W 150309'
'4W 120409'
Any suggestions?
thanks

采纳的回答

Sean de Wolski
Sean de Wolski 2012-6-21
How about this hideous idea?
C = {''; '4W231108' ; '4W211208' ; '4W180109' ; '4W150209' ; '4W150309' ; '4W120409'}
C2 = cellfun(@(x)[{x(1:min(numel(x),2))} {x(3:end)}],C,'uni',false);
C2 = vertcat(C2{:});
  8 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by