Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!k16g2000hsf.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: My files vanished
Date: Wed, 22 Oct 2008 03:00:59 -0700 (PDT)
Organization: http://groups.google.com
Lines: 83
Message-ID: <7ff82278-f89d-4bf4-a7c6-ccbfefa4c171@k16g2000hsf.googlegroups.com>
References: <gd46qe$lhj$1@fred.mathworks.com> <gd5f0m$okr$1@fred.mathworks.com> 
	<fe804dd8-ddcb-4ae8-b949-2d37bad0cd7a@h60g2000hsg.googlegroups.com> 
	<gdmmnm$35h$1@fred.mathworks.com>
NNTP-Posting-Host: 77.17.161.158
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1224669660 23376 127.0.0.1 (22 Oct 2008 10:01:00 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 22 Oct 2008 10:01:00 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: k16g2000hsf.googlegroups.com; posting-host=77.17.161.158; 
	posting-account=VAp5gAkAAAAmkCze5hvZtMeedpZWNthI
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
	CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:496716


On 22 Okt, 10:03, "Gema Abrajano" <gdabraj...@yahoo.com> wrote:
> Rune Allnor <all...@tele.ntnu.no> wrote in message <fe804dd8-ddcb-4ae8-b949-2d37bad0c...@h60g2000hsg.googlegroups.com>...
> > On 17 Okt, 08:58, "Florent Heidet" <flo...@hotmail.com> wrote:
> > > "Bruno Luong" <b.lu...@fogale.findmycountry> wrote in message <gd6jkh$24...@fred.mathworks.com>...
> > > > "Florent Heidet" <flo...@hotmail.com> wrote in message <gd5f0m$ok...@fred.mathworks.com>...
>
> > > > > Any idea...?
>
> > > > Check Windows "Control Panel -> Folder Options -> View" (or something like this) and make sure your files are not hidden by one of the checked configuration.
>
> > > > This is more likely OS.
>
> > > > Bruno
>
> > > I also checked that...unsuccessfully...
>
> > > :-(
>
> > Did you try to store the files somewhere else and only have
> > the startup.m I showed you in the work directory?
>
> > Rune
>
> i did what you advised - creating a new folder and then just leaving the startup.m in the work directory.. then i changed my current directory in matlab from work to the new folder that i created.. it's working and everything seems to be fine now since i can access the new files generated by matlab, so thank you for this..
>
> but i have a newb question to ask.. isn't the work folder some sort of the default folder for matlab, therefore would i be having problems in the future for some other files going into the work directory?

MATLABROOT/work is the default directrory and where users are
supposed
to store their files, but there are two problems with it (as it
appeared
on R2006a and before):

- On the window platform it resides in the C:\Program files folder,
  which is a place where users should not need to mess around
- There are (was) different work directores for different versions
  of matlab, so you will have (had) to move all your files to
  the new work directory every time you update matlab.

> or is it that since my current directory is already the new directory that i created, then i wouldn't have to worry about the old work directory anymore?

What you want as a user is to update your matlab lisences with
at little fuzz as possible. In principle this should be as
easy as

1) Uninstall the present matlab version
2) Install the new matlab version

and everything should remain the same way it was the
last time you shut down the old version when you start
the new version for the first time.

In practice, you have to (at least up to and including
R2006a) move the work directory into a new place and
maybe also the preferences directory. Not a big deal,
but lots of users don't know how to do that. And there
is no reason they should need to, as matlab should be
able to use old setup-files when a noew version is
installed. It'a a trivial thing to do for the programmers,
but it has to be done.

So you as user wants to minimize the hazzle. One way of
doing that is to make a folder e.g. under 'My Documents'
where you store your matlab-related stuff. Since it is
not in the standard matlab hierarchy, matlab doesn't
know about this folder, and thus can't mess with it
when you uninstall matlab.

> and what's the use of the startup.m file left there?

The matlab looks for a startup.m file in the work
directory every time it starts up. So any instructions
inside that file are executed automatically.

Since you have stored all your files in a place
matlab doesn't know about, you need to let matlab
know where to look for files and set the working
directory (note the difference between 'work
directory' and 'working directory'). The CD command
makes matlab set your local directory as the
working directory.

Rune