Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Open tool in Guide GUI app won't run uigetfile

조회 수: 1 (최근 30일)
curoi
curoi 2015년 2월 6일
마감: MATLAB Answer Bot 2021년 8월 20일
I've compiled an application for Matlab that, when run and the open tool is selected from the toolbar, is supposed to directthe user to the default location specified in the gui function. This location is a specific directory on one of the stash locations on a network. However, when the program is actually run and the open tool is selected, the dialog box points to the local drive directory instead.
In contrast, this is not an issue when the .m file is run in Matlab as a standalone function. Is there a reason the uigetfile cannot locate the default directory name when run within the application?
  댓글 수: 2
curoi
curoi 2015년 2월 6일
편집: curoi 2015년 2월 6일
Also, a second uigetdir command in the same callback function does not even run after I attempt to select the correct directory in the first uigetdir command.
The following command also inexplicably returns an empty array despite the dirpath location being specified and ending in '\':
filedir = dir([dirpath, '*.jpg']);
Jan
Jan 2015년 2월 7일
Please use the chance to edit the original question instead of appending a comment.
Use fullfile instead, because it considers trailing file separators:
dir(fullfile(dirpath, '*.jpg'));

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by