Path: news.mathworks.com!not-for-mail
From: "Irian O" <merlingt1@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: How to change startup directory in Matlab 7.5
Date: Sat, 8 Mar 2008 22:31:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 15
Message-ID: <fqv437$s8b$1@fred.mathworks.com>
Reply-To: "Irian O" <merlingt1@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1205015463 28939 172.30.248.37 (8 Mar 2008 22:31:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 8 Mar 2008 22:31:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1308702
Xref: news.mathworks.com comp.soft-sys.matlab:456151


Hi everyone,

I have been the following commands in one of my codes:

!matlab -nosplash -r myscript &

This starts a new instance of Matlab and runs the script 
"myscript.m". The problem is that when the new Matlab 
window opens it starts in the default main Matlab directory 
instead on the current or working directory when I ran the 
"!matlab .... command". Does anyone know how I can change 
it so it remembers in which directory the previous working 
directory?

Thanks!