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!