Back when we introduced configurations in R2007b (see this blog entry), one of the first questions brought up by customers was “where are the configurations stored and what format are they in?”. A completely understandable request, as it can be disconcerting to put time and energy into something and not know what controls the fate of your hard work (i.e. what happens if I upgrade MATLAB or move to another machine?).
You’ll find a number of files in this directory – the two we’re interested in are run_configurations.m and publish_configurations.m. These two files are both MATLAB files that use cell mode. You can open up the raw run and publish configuration storage files in the MATLAB editor for viewing, but you shouldn’t edit these files directly (see note below).
NOTE: Do not edit run_configuration.m or publish_configuration.m within the MATLAB Editor – use either the Configuration Editor, or modify the files from a text editor when MATLAB is not running.
Here’s what the beginning of my run_configurations.m file looks like:
% MATLAB Run Configurations % @version 2 % It is recommended that you do not edit this file directly, but use the % Configuration Editor provided in MATLAB. Changes made to comments that % exist outside of a configuration will not be saved. %% @name foo % @associatedFile /mathworks/home/korr/Desktop/foo.m % @mostRecentlyActioned false % @uniqueId -4e3eabb0:11a2a50508e:-7f8f % Modify expression to add input arguments. % Example: % a = [1 2 3; 4 5 6]; % foo(a); x = 1:100; foo(x); disp('Done running foo.');
You can share this file with others, though there currently isn’t a way to import another run or publish configuration file. With MATLAB shutdown, the receiving user can either copy and paste the desired configurations into his own configurations file or rename his configurations file from run_configurations.m to something like run_configurations_old.m.
If the receiving user doesn’t have a MATLAB file that a configuration is linked to, the Configuration Editor will indicate the problem by placing a red x next to the file name:
To fix this problem, point the Configuration Editor to the MATLAB file that the configuration corresponds to by editing the Associated M-File text field, or by clicking Choose… to navigate to the file.
We’d love to here what enhancements you would like to see in the Configuration Editor!
コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。