Hey guys,
I have a cell array called "MD", attaching picture
pic9.JPG
it is a 1x2 cell, I want to make it 2x1 cell array, because then I would be able to convert it into a struct using this code
fields = {'model_data'};
Body_Data =cell2struct(MD,fields,2);
Does anybody know how to change the dimensions of the cell array?

 채택된 답변

Stijn Haenen
Stijn Haenen 2020년 2월 2일

0 개 추천

You can do this with: '
field=field';

댓글 수: 1

Chris Dan
Chris Dan 2020년 2월 3일
Stijn Haenen
Wrong chocie of variable name, but I got it (Y)

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

추가 답변 (0개)

카테고리

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

질문:

2020년 2월 2일

댓글:

2020년 2월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by