Finding values in an Array
Afficher commentaires plus anciens
If I have an array such as
Subject= [126;156;1992, 203, 186] % First two digits determine group, additional numbers are specific subject within that group.
Is there a method to only read the first two values of each row in order to determine what group the subject is?
Group= [12;15;19;20;18] %%%This is what I would like the result to be.
Réponse acceptée
Plus de réponses (2)
Walter Roberson
le 30 Jan 2014
Group = floor(Subject ./ 10);
1 commentaire
Aldo Amaya
le 30 Jan 2014
Aldo Amaya
le 30 Jan 2014
Modifié(e) : Aldo Amaya
le 30 Jan 2014
Catégories
En savoir plus sur Cell Arrays dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!