Effacer les filtres
Effacer les filtres

How can I rebuild the Table as a 5x1 structured array with "struct" Code ??

2 vues (au cours des 30 derniers jours)
Jack
Jack le 27 Sep 2013
Commenté : Jack le 27 Sep 2013
Table = {'GasName','GasSymb','a','b';[ 'Helium', 'Hydrogen', 'Oxygen', 'Chlorine','CarbonDioxide']',[ 'He', 'H2', 'O2', 'Cl2','CO2']',[0.0341,0.244,1.36,6.49,3.59]',[0.0237,0.0266,0.0318,0.052,0.0427]'}
Table =
'GasName' 'GasSymb' 'a' 'b'
[41x1 char] [12x1 char] [5x1 double] [5x1 double]

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 27 Sep 2013
data1=['Helium','Hydrogen','Oxygen','Chlorine','CarbonDioxide']';
data2=[ 'He', 'H2', 'O2', 'Cl2','CO2']';
data3=[0.0341,0.244,1.36,6.49,3.59]';
data4=[0.0237,0.0266,0.0318,0.052,0.0427]';
table=struct('GasName',data1,'GasSymb',data2,'a',data3,'b',data4)

Plus de réponses (0)

Catégories

En savoir plus sur Cell Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by