Unique Number Assignment To Each Time
    7 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    Curious Mind
 le 18 Jan 2020
  
    
    
    
    
    Commenté : Curious Mind
 le 22 Jan 2020
            Hi,
I have a series of times in column 1. The times are 1.1, 1.1, 1.1, 1.2, 1.2, 1.2, 2.1, 2.1, 2.1 etc. I want to assign a unique number to each of these times. In order words, each time series should have its own number. Eg, all 1.1 should be assign the number 0, all 1.2 to the number 1 etc. A unique number to each series or repeating time. Any thoughts?
Thanks!
0 commentaires
Réponse acceptée
  Andrei Bobrov
      
      
 le 18 Jan 2020
        a=[1.1, 1.1, 1.1, 1.2, 1.2, 1.2, 2.1, 2.1, 2.1]'
[i,g]=findgroups(a);
out = i - 1;
Plus de réponses (1)
Voir également
Catégories
				En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange
			
	Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


