2011-03-08 49 views
4

我認爲這將是有趣的,如果人們共享捷徑(或mfiles),他們通常在Matlab中使用,以提高他們的生產力。MATLAB快捷方式

下面是我的一些:

% 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 

我也使用測試,使快捷方式,但它們是針對我的代碼。

+4

你應該把這個問題社會的維基,或者人們將其關閉。 – Lucas

+0

這應該是一個社區維基。 –

回答

1

快捷方式主要的Git倉庫:

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); 
3

下面是我的一些:

% 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); 
+0

爲什麼?包之後會刪除文件。 –