doc uigetfile
gives examples of specifying filters for file type.
You can use a generic uigetfile and a check like that after if you prefer, but it seems to make more sense to just use the uigetfile filter, e.g.
[file, path] = uigetfile( '*.ctm', 'Some title or other' )
though there are fancier options too.