convert struct2mat
조회 수: 18 (최근 30일)
이전 댓글 표시
I have a struct.I want convert this struct to matrix. I used the
cell2mat( struct2cell( YourStructure ) )
command and I got that error
Error using class
Not enough input arguments.
My struct name is 'class'. I used this
cell2mat(struct2cell(class)).
채택된 답변
Birdman
2018년 4월 10일
This example perfectly works for me. Are you sure that your class struct is really a struct, or what kind of field does it contain? For instance:
class=struct('a',3);
cell2mat(struct2cell(class))
This one can be converted to mat without any error.
댓글 수: 6
추가 답변 (1개)
Sandra Maria Cherian
2018년 6월 23일
I am also facing the same problem. The code cell2mat(struct2cell(structure)) is not working for me. It is showing error message.Did you get your code working?
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
