How to convert a cell array to a structure matrix?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a cell array ' col_names = {'Lp max '; 'G max'; ' G min'}.
I want to convert it into a structure array. I am not able to use the standard cell2mat command. As a final output I need col_names = [Lp max;Gmax;Gmin].
Please suggest a solution.
댓글 수: 0
답변 (1개)
Azzi Abdelmalek
2014년 6월 20일
col_names = {'Lp max '; 'G max'; 'G min'}
v=cell2struct(col_names,'names',numel(col_names))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!