%UIPUTFILE Standard save file dialog box.
%   [FILENAME, PATHNAME] = UIPUTFILE(FILTERSPEC, TITLE)
%   displays a dialog box for the user to fill in and returns the
%   filename and path strings.  
%
%   The FILTERSPEC parameter determines the initial display of files in 
%   the dialog box.  For example '*.m' lists all the MATLAB M-files.  If
%   FILTERSPEC is a cell array, the first column is used as the list of
%   extentions, and the second column is used as the list of descriptions.
%
%   When FILTERSPEC is a string, "All files (*.*)" is appended to the list,
%   nothing is appended when FILTERSPEC is a cell array.
%
%   When filterspec is empty the default list of file types is used.  See
%   example 2 below.
%   
%   FILTERSPEC can also be a default filename.  When FILTERSPEC is a 
%   filename, the file's extention is used as the default filter.
%
%   Parameter TITLE is a string containing the title of the dialog
%   box.
%
%   The output variable FILENAME is a string containing the name of the
%   file selected in the dialog box.  If the user presses the Cancel button
%   or if any error occurs, it is set to 0.
%
%   The output variable PATH is a string containing the name of the path
%   selected in the dialog box.  If the user presses the Cancel button 
%   or if any error occurs, it is set to 0.
%
%   [FILENAME, PATHNAME] = UIPUTFILE(FILTERSPEC, TITLE, X, Y)
%   places the dialog box at screen position [X,Y] in pixel units.
%   Not all systems support this option.
%
%   Examples:
%
%   [filename, pathname] = uiputfile('matlab.mat', 'Save Workspace as');
%
%   [filename, pathname] = uiputfile('*.mat', 'Save Workspace as');
%
%   [filename, pathname] = uiputfile( ...
%      {'*.m;*.fig;*.mat;*.mdl', 'All MATLAB Files (*.m, *.fig, *.mat, *.mdl)';
%       '*.m',  'M-files (*.m)'; ...
%       '*.fig','Figures (*.fig)'; ...
%       '*.mat','MAT-files (*.mat)'; ...
%       '*.mdl','Models (*.mdl)'; ...
%       '*.*',  'All Files (*.*)'}, ...
%       'Save as');
%
%   Note, multiple extensions with no descriptions must be separated by semi-
%   colons.
%
%   [filename, pathname] = uiputfile( ...
%      {'*.m';'*.mdl';'*.mat';'*.*'}, ...
%       'Save as');
%
%   Associate multiple extensions with one description like this:
%
%   [filename, pathname] = uiputfile( ...
%      {'*.m;*.fig;*.mat;*.mdl', 'All MATLAB Files (*.m, *.fig, *.mat, *.mdl)'; ...
%       '*.*',                   'All Files (*.*)'}, ...
%       'Save as');
%
%   This code checks for the existence of the file and returns a message 
%   about the success or failure of the save operation.
%
%   [filename, pathname] = uiputfile('*.m', 'Pick an M-file');
%   if isequal(filename,0)|isequal(pathname,0)
%      disp('File not found')
%   else
%      disp(['File ', pathname, filename, ' has been saved.'])
%   end
%
%
%   See also UIGETFILE.

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 5.10 $  $Date: 2000/07/30 12:50:35 $
%   Built-in function.

