MATLAB Shortcuts

I thought it would be interesting if people shared the shortcuts (or mfiles) that they usually use in Matlab to increase their performance.

Here are some of mine:

% Shortcut 1 clear all close all clc try dbquit('all') end % Shortcut 2 - Show complexity of current m-file mlint(editorservices.getActive().Filename,'-cyc','-id') % Shortcut 3 - Start debugging dbstop if error dbstop if caught error dbstop if warning % Shortcut 4 - Stop debugging dbclear if error dbclear if caught error dbclear if warning 

I also use the test and create shortcuts, but they are specific to my code.

+4
source share
2 answers

Here are some of mine:

 % Tidy up close all hidden force % Those figures WILL go away clear variables % Better than clear all, which removes more than just variables home % Better than clc - you can still scroll up to see history pack % Open Explorer in the current directory winopen(pwd) % Open a DOS prompt in the current directory !start % Open a new file in the editor, with copyright line (needs a recent version) newFunctionName = 'newfunction'; text = sprintf('function %s\n\n%% Copyright %s Company Name.\n\n',... newFunctionName, datestr(now,'YYYY')); newDoc = matlab.desktop.editor.newDocument(text); 
+3
source

Shortcut for the main git repository:

 InitDirectory = cd; cd(GitFolder); dos('"C:\Program Files (x86)\Git\bin\wish.exe" "C:/Program Files (x86)/Git/libexec/git-core/git-gui" &'); cd(InitDirectory); 
+1
source

Source: https://habr.com/ru/post/1342893/


All Articles