필터 지우기
필터 지우기

Generate matrix from non empty cells from another cell array

조회 수: 1 (최근 30일)
Islam Hassan
Islam Hassan 2020년 7월 10일
댓글: Islam Hassan 2020년 7월 10일
I have a cell matrix like this
I need to generate matrix for the non empty cell in these format and arrange row by row ( form above to below)
A = [ 16 3
21 3
16 4
22 4
4 5
9 5
16 5
22 5
. . ] so on.
How can we do that?

채택된 답변

madhan ravi
madhan ravi 2020년 7월 10일
c = cell_array.';
ix = cellfun('isempty',c);
w = cellfun(@flip,c(~ix),'un',0);
Wanted = cat(1, w{:})
  댓글 수: 4
madhan ravi
madhan ravi 2020년 7월 10일
Then don’t transpose ;).

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by