Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
file importing

Subject: file importing

From: Julie

Date: 3 Apr, 2013 19:46:05

Message: 1 of 2

I have a folder with several images in it that I need to be able to call, but they are very long numbers and the numbering is not sequential. I was wondering if there was a way to call a folder and then the file placement (i.e. folder file #20) within that folder instead of calling by its file name?

Thank you for your help

Subject: file importing

From: ade77

Date: 4 Apr, 2013 13:14:08

Message: 2 of 2

"Julie" wrote in message <kji0tt$aiq$1@newscl01ah.mathworks.com>...
> I have a folder with several images in it that I need to be able to call, but they are very long numbers and the numbering is not sequential. I was wondering if there was a way to call a folder and then the file placement (i.e. folder file #20) within that folder instead of calling by its file name?
>
> Thank you for your help

doc dir

use dir function to get hold of the directory, and iterate over all the files

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us