MATLAB: How to specify the location of a UIGETFILE box on a Windows machine

MATLABuiputfile

To open the file-selection dialog box, I use the UIGETFILE function. The documentation states that the following line of code:
uigetfile('Location',[x y])
opens a dialog box at position [x,y], where x and y are the distances in pixel units from the left and top edges of the screen. The Location property-value pair is currently supported only on UNIX platforms.
The same holds true for the UIPUTFILE function. I am using MATLAB on Windows and I would like to position the dialog box somewhere other than the top-left corner of the screen.

Best Answer

The ability to specify a Location property-value pair in a UIGETFILE or UIPUTFILE command is not available when running MATLAB in Windows.
To work around this issue, you will need to use a list-selection dialog box to select a file. The LISTDLG function opens a dialog in the center of the screen (rather than the top-left corner).
To see how to populate a list-selection dialog with the contents of a directory, refer to the example at the bottom of the LISTDLG documentation.