Write a function that returns the requested property of atoms belonging to the requested groupnumber
Afficher commentaires plus anciens
I am trying to write a function periodic table that will return the requested property of atoms that belong to the requested group number.
Here is what I have so far....I am stuck as to where to go from here:
unction [ output_args ] = periodictable(p, g) %that returns the requested property of atoms belonging to the requested %groupnumber. Consider only the first 18 atoms in the periodic table (i.e., %up to and including Argon). Inside your function, store the periodic table %of elements as a structure array. Store the atomicnumber, group, period, %and symbol for each atom.
p=struct('symbol', {'H' 'He' 'Li' 'Be' 'B' 'C' 'N' 'O' 'F' 'Ne' 'Na' 'Mg' 'Al' 'Si' 'P' 'S' 'Cl' 'Ar'}, 'atomicnumber', {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18}, 'period', {1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3} , 'group', {1 18 1 2 13 14 15 16 17 18 1 2 13 14 15 16 17 18});
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Instrument Control Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!