How do you pad every other element of a cell array with a blank value thereby doubling the length of the cell?

 채택된 답변

Voss
Voss 2022년 11월 28일

0 개 추천

Maybe something like this:
C = {1 2 3 4};
C_new = cell(1,2*numel(C));
C_new(1:2:end) = C
C_new = 1×8 cell array
{[1]} {0×0 double} {[2]} {0×0 double} {[3]} {0×0 double} {[4]} {0×0 double}

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

릴리스

R2021b

질문:

2022년 11월 28일

답변:

2022년 11월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by