필터 지우기
필터 지우기

Help with searching for a specific input filetype within a directory

조회 수: 1 (최근 30일)
t4741
t4741 2019년 9월 5일
댓글: t4741 2019년 9월 5일
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?

채택된 답변

Stephen23
Stephen23 2019년 9월 5일
F = '.jpeg'
S = dir(['*',F])

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by