Path: news.mathworks.com!not-for-mail
From: "Matthew Wade" <cosmicspacepig@googlemail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Matlab path issues
Date: Mon, 18 Aug 2008 10:13:03 +0000 (UTC)
Organization: ttz-Bremerhaven
Lines: 31
Message-ID: <g8bhvf$ail$1@fred.mathworks.com>
Reply-To: "Matthew Wade" <cosmicspacepig@googlemail.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 1219054383 10837 172.30.248.37 (18 Aug 2008 10:13:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 18 Aug 2008 10:13:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1052756
Xref: news.mathworks.com comp.soft-sys.matlab:485994



Hi,

I have an application (GUI) that also is compiled as a 
stand-alone executable to be run on other machines.

1. The GUI has some functions that require data to be 
saved/called from specific paths, e.g. 
C:/Matlab7.1/work/Results

2. To ensure the data is stored in the correct folders, I 
use cd pathname, or xlswrite('pathname',data), for example.

3. For some time, I was able to specify the pathname as 
only /Results, and this enabled flexibility - now I get 
error messages (unknown directory) and cannot trace back 
the problem - I now have to use the complete pathname.

4. When I install the stand-alone executable on a new 
machine, the problem will occur that I do not have the same 
pathname as on the host computer, so when the script cd or 
xlswrite is executed with a specifie path, there will be an 
error.

Can anyone think of a way to specify folders/directories 
that can be generic to any machine? e.g. a function that 
creates a folder "Results" in a common and sensible 
location (i.e. the Program location f?r the executable and 
the work folder for the original -m files).

Thanks
Matt