How to convert a cell array to a structure matrix?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Azzi Abdelmalek
le 20 Juin 2014
col_names = {'Lp max '; 'G max'; 'G min'}
v=cell2struct(col_names,'names',numel(col_names))
0 commentaires
Voir également
Catégories
En savoir plus sur Structures dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!