필터 지우기
필터 지우기

copy different cell values to a single cell

조회 수: 1 (최근 30일)
Elysi Cochin
Elysi Cochin 2016년 1월 14일
답변: Guillaume 2016년 1월 14일
i have 3 cell of size (c1 = 1 X 5; c2 = 1 X 10; c3 = 1 X 15); i wanted to copy all the cell values to a single cell of size (c = 1 X 40)
please tell me how to do it

채택된 답변

Guillaume
Guillaume 2016년 1월 14일
Simple:
c = {zeros(1, 5); ones(1, 10); zeros(1, 15)}; %for example
newc = [c{:}]
This uses the expansion of cell arrays into a comma separated list

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by