How to delete the colon's in a matrix?
    1 Ansicht (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
Hi;
I have a data in the form of :
1,2:8
1,3:3
1,4:3
1,5:2
1,6:5
Is there an easy way to remove the colons and have the form below?
1,2,8
1,3,3
1,4,3
1,5,2
1,6,5
I have many many rows like that and I am looking for a quick way if possible...
Regards...
2 Kommentare
Antworten (2)
  Walter Roberson
      
      
 am 9 Mär. 2016
        If you have strings or a cell array of strings, you could use
regexp(TheData, ':', ',')
  Jos (10584)
      
      
 am 9 Mär. 2016
        Is the data stored as strings in a cell array?
C = {'1,6:3','2,5:3','99,103:4'}
C2 = strrep(C,':',',')
0 Kommentare
Siehe auch
Kategorien
				Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



