How to specify Matlab "starting" folder ?

3 ビュー (過去 30 日間)
Pavel
Pavel 2016 年 11 月 14 日
コメント済み: Pavel 2016 年 11 月 14 日
Hello,
I've specified starting folder in Matlab shortcut "Start in" option. When Matlab opens, indeed, the "Current Folder" is that I specified in "Start in" option. Then, after "Initialization" phase it switches to some another folder.
Quite annoying behavior ... Does exist some workaround ?
Thanks.
  3 件のコメント
Pavel
Pavel 2016 年 11 月 14 日
Thanks, Here is the content of startup.m, located in: C:\Program Files\MATLAB\MATLAB Production Server\R2015a\toolbox\matlab\iofun\+matlab\+internal\+storage
function startup
% STARTUP Startup hook for storage integration.
% Copyright 2014 The MathWorks, Inc.
% File intentionally left blank.
% This is intended to be overridden at runtime with function containing some
% real implementation. This empty implementation allows matlabrc to call us
% safely without needing try/catch or existence checks.
end
It is empty ... no any traces of the directory where Matlab opens. How to edit it ? Probably does exist some option in Matlab setting (at least it is the case of majority of modern tools)
Jan
Jan 2016 年 11 月 14 日
What exactly is your "Initialization phase"? Which is the "some another" folder? Do you have any modifications in matlabrc.m? You can edit startup.m simply by editing it. Do you have more than 1 startup.m file? See "which startup -all"

サインインしてコメントする。

採用された回答

Steven Lord
Steven Lord 2016 年 11 月 14 日
Go to the Preferences in the Environment section of the Home tab. In the General preferences for MATLAB, change the preferences in the "Initial working folder" box.
  1 件のコメント
Pavel
Pavel 2016 年 11 月 14 日
Yes it is. Thanks !

サインインしてコメントする。

その他の回答 (1 件)

Pavel
Pavel 2016 年 11 月 14 日
Here is screenshot taken just after Matlab launching (please see at the bottom of image). Actually the "Current folder" is what I specified in icon "Start in" option (and this is the location what I want)
After about 1 ... 2 min (Initialization is finished, Matlab is ready) the "Current folder" is changed and pointed to another directory (a project I worked some weeks ago)
Concerning "which startup -all", I work on Windows platform.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by