필터 지우기
필터 지우기

transform a cell into a column vector

조회 수: 3 (최근 30일)
Alberto Acri
Alberto Acri 2023년 7월 13일
답변: Dyuman Joshi 2023년 7월 13일
Hi. I have a cell 'test' characterized in the first row by a 29x1 array and in the second row by a 27x1 array.
I want to get an array of size 56x1 where the elements are in order, so there are first the 29 numbers of the first array and then the 27 numbers of the second array.

채택된 답변

Dyuman Joshi
Dyuman Joshi 2023년 7월 13일
load('test.mat')
%Vertically concatenate into an array
z = vertcat(test{:})
z = 56×1
69 70 71 72 73 74 75 76 77 78
If you want to convert the output into a cell then sipmly use curly brackets -
out = {z}
out = 1×1 cell array
{56×1 uint8}

추가 답변 (0개)

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by