How to add header to cell matrix

조회 수: 7 (최근 30일)
Abdulaziz Abutunis
Abdulaziz Abutunis 2022년 2월 23일
편집: per isakson 2022년 2월 23일
Dear all, I have 39x1 cells. Each cell of these 39 cells has matix in it. I wanted to add header to each matrix. Is that possible in Matlab?
Thanks
Aziz

채택된 답변

per isakson
per isakson 2022년 2월 23일
편집: per isakson 2022년 2월 23일
No, however that depends on what you require from the "header". Is this useful? If not see table - Table array with named variables that can contain different types
data = { rand(2,3), rand(2,3), rand(2,3) };
headers = {'header 1', 'header 2', 'header 3' };
data_with_headers( 1, : ) = headers;
data_with_headers( 2, : ) = data;
data_with_headers( :, 2 )
ans = 2×1 cell array
{'header 2'} {2×3 double}

추가 답변 (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