Function: putfile

CALL:

[fname,pname,full_fname]=putfile(ext,FigureName,ISBATCHMODE,fname,tag)

DESCRIPTION:

Return file with specific extension from default directory

INPUT:

ext any
extension of file to be selected (defaults to'.m').
Option 1:
    ext is char string. ext may be specified with or without
    preceeding ".".
Option 2:
    ext is a Nx2 or Nx1 cell array. Cells in column 1 contain
    file masks, like "*.txt". Cells in column 2 contain
    corresponding labels that will be shown to the user. If
    column 2 is not specifield the labels will be shown as
    "(*.txt)"
FigureName any
Name property for figure. Defaults to ''.
ISBATCHMODE any
(1x1 logical) Defaults to false. If true: suppress any
interaction
fname any
1xP char array. Default filename for dialogue. Defaults to
'*.ext'
Note: if fname contains an extension that is not in the list of
allowable extensions, the xtendion will be included th in de
default failename. For example if fname ="example.dia" en
filemask is "*.txt", accepting the default results in
"example.dia.txt"
tag any
Integer or string. Tag to be used in defaultpathNew. Defaults to
1. When the user selects a file, the path will be remembered and
presented the next time putfile is called with the same tag.

OUTPUT:

fname any
Selected file, 0 if cancelled
pname any
Path of selected file.
full_fname any
         Filename including path

USER INPUT
        gebruiker selecteert filenaam

 EXAMPLE (1)
     [~,~,fname]=putfile('txt','Save ASCII file',0,'MyFile','AsciiDump');
     if ~fname
         return
     end
     ..