Actually csvread does not work for me because my data contain not only numerical variables. I have also strings and cells. Is there a way I can use the function dataset?
Importing only a fraction of a database using dataset
    3 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Sebastiano delre
 el 14 de Mayo de 2016
  
    
    
    
    
    Comentada: Sebastiano delre
 el 15 de Mayo de 2016
            I have a large dataset in csv format (400MB). How can I import in MatLab only the first 500 rows?
Respuesta aceptada
  Azzi Abdelmalek
      
      
 el 14 de Mayo de 2016
        nc=6; % Number of column in your csv file
nr=500  
data=csvread('file.csv',0,0,[0 0 nr-1 nc-1])
4 comentarios
  Walter Roberson
      
      
 el 14 de Mayo de 2016
				xlsread() accepts range arguments.
You have R2013b according to your other postings; you could consider readtable() . I do not know how fast that would be; I seem to remember later releases made it faster.
Más respuestas (0)
Ver también
Categorías
				Más información sobre Database Toolbox en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!