uigetfile function opens a diaglog by default checking to all MATLAB files.
You can change the option to "All Files" in order to display the text files in dialog box.
As an example
filename = uigetfile("*.txt"); % opens a dialog box with all filenames ending with .txt