MATLAB Desktop Keyboard Shortcuts

  • View
    138

  • Download
    5

Embed Size (px)

Text of MATLAB Desktop Keyboard Shortcuts

MATLAB desktop keyboard shortcuts, such as Ctrl+S, are now customizable. In addition, many keyboard shortcuts have changed for improved consistency across the desktop.

To customize keyboard shortcuts, use Preferences. From there, you can also restore previous default settings by selecting "R2009a Windows Default Set" from the "Active settings" drop-down list. For more information, see Help.

Click here if you do not want to see this message again.

Warning: Icon must be 'custom' when specifying icon data in MSGBOX > In msgbox at 112 In deneme6>pushbutton3_Callback at 120 In gui_mainfcn at 96 In deneme6 at 42 In @(hObject,eventdata)deneme6('pushbutton3_Callback',hObject,eventdata,guidata(hObject)) Warning: Input should be a string. > In strcat at 84 In deneme6>pushbutton1_Callback at 88 In gui_mainfcn at 96 In deneme6 at 42 In @(hObject,eventdata)deneme6('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) Warning: Input should be a string. > In strcat at 92 In deneme6>pushbutton1_Callback at 88 In gui_mainfcn at 96

In deneme6 at 42 In @(hObject,eventdata)deneme6('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) ??? Error using ==> imread at 363 File "" does not exist.

Error in ==> deneme6>pushbutton1_Callback at 88 im = imread(strcat(PathName,FileName));

Error in ==> gui_mainfcn at 96 feval(varargin{:});

Error in ==> deneme6 at 42 gui_mainfcn(gui_State, varargin{:});

Error in ==> @(hObject,eventdata)deneme6('pushbutton1_Callback',hObject,eventdata,guidata(hObject))

??? Error while evaluating uicontrol Callback

82 if nargout K>> nargout

ans =

0

82 if nargout

K>> nargout

ans =

0

>> help uigetfile UIGETFILE Standard open file dialog box. [FILENAME, PATHNAME, FILTERINDEX] = UIGETFILE(FILTERSPEC, TITLE) displays a dialog box for the user to fill in, and returns the filename and path strings and the index of the selected filter. A successful return occurs only if the file exists. If the user selects a file that does not exist, an error message is displayed, and control returns to the dialog box. The user may then enter another filename, or press the Cancel button.

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 extensions, and the second column is used as the list of descriptions.

When FILTERSPEC is a string or a cell array, "All files" is appended to the list.

When FILTERSPEC is empty the default list of file types is used.

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 Cancel, it is set to 0.

The output variable PATHNAME is a string containing the path of the file selected in the dialog box. If the user presses Cancel, it is set to 0.

The output variable FILTERINDEX returns the index of the filter selected in the dialog box. The indexing starts at 1. If the user presses Cancel, it is set to 0.

[FILENAME, PATHNAME, FILTERINDEX] = UIGETFILE(FILTERSPEC, TITLE, FILE) FILE is a string containing the name to use as the default selection.

[FILENAME, PATHNAME] = UIGETFILE(..., 'MultiSelect', SELECTMODE) specifies if multiple file selection is enabled for the UIGETFILE dialog. Valid values for SELECTMODE are 'on' and 'off'. If the value of 'MultiSelect' is set to 'on', the dialog box supports multiple file selection. 'MultiSelect' is set to 'off' by default.

The output variable FILENAME is a cell array of strings if multiple filenames are selected. Otherwise, it is a string representing the selected filename.

[FILENAME, PATHNAME] = UIGETFILE(..., 'Location', [X Y]) places the

dialog box at screen position [X,Y] in pixel units. This option is supported on UNIX platforms only. NOTE: THIS SYNTAX IS OBSOLETE AND WILL BE IGNORED

[FILENAME, PATHNAME] = UIGETFILE(..., X, Y) places the dialog box at screen position [X,Y] in pixel units. This option is supported on UNIX platforms only. NOTE: THIS SYNTAX IS OBSOLETE AND WILL BE IGNORED.

Examples:

[filename, pathname, filterindex] = uigetfile('*.m', 'Pick an M-file');

[filename, pathname, filterindex] = uigetfile( ... {'*.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 (*.*)'}, ... 'Pick a file');

[filename, pathname, filterindex] = uigetfile( ... {'*.mat','MAT-files (*.mat)'; ... '*.mdl','Models (*.mdl)'; ... '*.*', 'All Files (*.*)'}, ... 'Pick a file', 'Untitled.mat');

Note, multiple extensions with no descriptions must be separated by semicolons.

[filename, pathname] = uigetfile( ... {'*.m';'*.mdl';'*.mat';'*.*'}, ... 'Pick a file');

Associating multiple extensions with one description:

[filename, pathname] = uigetfile( ... {'*.m;*.fig;*.mat;*.mdl', 'All MATLAB Files (*.m, *.fig, *.mat, *.mdl)'; ... '*.*', 'Pick a file'); 'All Files (*.*)'}, ...

Enabling multiple file selection in the dialog:

[filename, pathname, filterindex] = uigetfile( ... {'*.mat','MAT-files (*.mat)'; ... '*.mdl','Models (*.mdl)'; ... '*.*', 'All Files (*.*)'}, ... 'Pick a file', ... 'MultiSelect', 'on');

This code checks if the user pressed cancel on the dialog.

[filename, pathname] = uigetfile('*.m', 'Pick an M-file');

if isequal(filename,0) || isequal(pathname,0) disp('User pressed cancel') else disp(['User selected ', fullfile(pathname, filename)]) end

See also uigetdir, uiputfile.

Reference page in Help browser doc uigetfile

??? Error using ==> imwrite at 393 Unable to determine the file format from the filename.

Error in ==> deneme6>pushbutton2_Callback at 105 imwrite(im,strcat(PathName,FileName));

Error in ==> gui_mainfcn at 96 feval(varargin{:});

Error in ==> deneme6 at 42 gui_mainfcn(gui_State, varargin{:});

Error in ==> @(hObject,eventdata)deneme6('pushbutton2_Callback',hObject,eventdata,guidata(hObject))

??? Error while evaluating uicontrol Callback

>> help uiputfile UIPUTFILE Standard save file dialog box. [FILENAME, PATHNAME, FILTERINDEX] = UIPUTFILE(FILTERSPEC, TITLE) displays a dialog box for the user to fill in and returns the filename and path strings and the index of the selected filter. A successful return occurs if a valid filename is specified. If an existing filename is specified or selected, a warning message is displayed. The user may select Yes to use the filename or No to return to the dialog to select another filename.

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 extensions, and the second column is used as the list of descriptions.

When FILTERSPEC is a string or a cell array, "All files" is appended to the list.

When FILTERSPEC is empty the default list of file types is used.

When FILTERSPEC is a filename, it is used as the default filename and the file's extension 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 Cancel, 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 Cancel, it is set to 0.

The output variable FILTERINDEX returns the index of the filter selected in the dialog box. The indexing starts at 1. If the user presses Cancel, it is set to 0.

[FILENAME, PATHNAME, FILTERINDEX] = UIPUTFILE(FILTERSPEC, TITLE, FILE) FILE is a string containing the name to use as the default selection.

[FILENAME, PATHNAME] = UIPUTFILE(..., 'Location', [X Y]) places the dialog box at screen position [X,Y] in pixel units. This option is supported on UNIX platforms only. NOTE: THIS SYNTAX IS OBSOLETE AND WILL BE IGNORED.

[FILENAME, PATHNAME] = UIPUTFILE(..., X, Y) places the dialog box at screen position [X,Y] in pixel units. This option is supported on UNIX platforms only. NOTE: THIS SYNTAX IS OBSOLETE AND WILL BE IGNORED.

Examples:

[filename, pathname] = uiputfile('matlab.mat', 'Save Workspace as');

[filename, pathname] = uiputfile('*.mat', 'Save Workspace as');

[filename, pathname, filterindex] = 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');

[filename, pathname, filterindex] = uiputfile( ... {'*.mat','MAT-files (*.mat)'; ... '*.mdl','Models (*.mdl)'; ... '*.*', 'All Files (*.*)'}, ... 'Save as', 'Untitled.mat');

Note, multiple extensions with no descriptions must be separated by semicolons.

[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)'; ... '*.*', 'Save as'); 'All Files (*.*)'}, ...

This code checks if the user pressed cancel on the dialog.

[filename, pathname] = uiputfile('*.m', 'Pick an M-file'); if isequal(filename,0) || isequal(pathname,0) disp('User pr