How can I import multiple text files by clicking a button in MATLAB GUI ?
    8 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Mora Akhil
 el 24 de Mzo. de 2017
  
    
    
    
    
    Respondida: Nagini Venkata Krishna Kumari Palem
      
 el 28 de Mzo. de 2017
            Hello, everyone!
I have to import all the text files in a folder by clicking a button in MATLAB GUI. The file contains mixed data: Text in the starting lines, followed by columns headers and data in which first 2 columns are date and time and the remaining data contains float values). I am unable to do it. Please help me out.
Thank you.
2 comentarios
  KSSV
      
      
 el 24 de Mzo. de 2017
				There are functions like importdata, testread, textscan to read text files. Have you read those?
Respuestas (1)
  Nagini Venkata Krishna Kumari Palem
      
 el 28 de Mzo. de 2017
        In my understanding you are looking for solution to read text files of different formats. You can use 'uiimport' command from command window or use 'import data' option from home tab.
- Customize the format of imported data and variable names as required using the relevant options in import tool.
- Click on the drop-down menu under 'Import Selection' and select 'Generate Script'.
- Using the generated script, you can import data from other files in the same format, all you have to do is change the filename.
For more information you can refer to the following documentation pages,
If you are looking for how to import all the files from a folder, one possible solution would be to iterate through all the files in a loop.
0 comentarios
Ver también
Categorías
				Más información sobre Workspace Variables and MAT Files 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!


