i have to read files in specific folder
    4 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
first thing i have to select files a folder 
then i have to read jpg 
in that folder 
how can i  do that 
i tried with below code
but i cant get the count 
test_image = uigetdir('F:\R Project\');
mat = dir ('*.jpg')
0 commentaires
Réponses (1)
  Bob Thompson
      
 le 14 Fév 2019
        You need to specify the path that you gathered with 'test_image', otherwise the dir command is just going to search the current directory.
test_image = uigetdir('F:\R Project\');
mat = dir([test_image,'\*.jpg']);
5 commentaires
  Bob Thompson
      
 le 15 Fév 2019
				It seems that the mat file isn't gathering the correct file name, so it is unable to load. I would suggest doing some more robust debugging of your own. Check things like making sure you don't have double slashes in your directory name, or aren't missing a slash. Try copying the name directly from file explorer and loading it directly, rather than having matlab generate the name reactively.
Voir également
Catégories
				En savoir plus sur File Operations dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

