필터 지우기
필터 지우기

A fast way of reshaping a cell array with elements with different sizes

조회 수: 8 (최근 30일)
Mnr
Mnr 2015년 6월 25일
댓글: Mnr 2015년 6월 26일
Hello all,
I have a cell array in this form:
a=[1x16x16 double] [1x8x16 double] [1x4x16 double] [1x2x16 double]
I am looking for a fast way to reshape each element such that I get
a=[16x16 double] [8x16 double] [4x16 double] [2x16 double].
I would appreciate your help!

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2015년 6월 25일
cellfun(@(x) reshape(x,[],16),your_cell,'un',0)

추가 답변 (1개)

Walter Roberson
Walter Roberson 2015년 6월 25일
편집: Walter Roberson 2015년 6월 25일
b = cellfun(@squeeze, a, 'uniform', 0);
  댓글 수: 3

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by