Filter löschen
Filter löschen

Help with searching for a specific input filetype within a directory

1 Ansicht (letzte 30 Tage)
I am trying to create a function that inputs a filetype and directory name and outputs a cell array of the images. If line 9 is written as;
imageNames = dir(filetype) and filetype = '*.jpeg' it will work.
However, the input for filetype can only be '.jpeg' (tasked constraint)
How can i fix this?

Akzeptierte Antwort

Stephen23
Stephen23 am 5 Sep. 2019
F = '.jpeg'
S = dir(['*',F])

Weitere Antworten (0)

Kategorien

Mehr zu File Operations finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by