Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.fr>
Newsgroups: comp.soft-sys.matlab
Subject: Read variables from  Workspace
Date: Fri, 18 Apr 2008 21:29:02 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 25
Message-ID: <fub3qu$mcl$1@fred.mathworks.com>
References: <fuaobd$hbu$1@fred.mathworks.com> <fuat72$ll4$1@fred.mathworks.com> <fub08i$nek$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.fr>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1208554142 22933 172.30.248.35 (18 Apr 2008 21:29:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 18 Apr 2008 21:29:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:463982


"Rami AbouSleiman" <rdabousl@oakland.edu> wrote in message
<fub08i$nek$1@fred.mathworks.com>...
 
> Thanks Bruno but i declared already as global thats why the 
> workspcae is changing but not the function.

I'm not sure I understand:

when a variable is declared as global, it stores in a space
that is common for all workspaces (WS).

Each function has they own WS. In order to access to this
variable, the variable should be declared as global in the
function, otherwise the homonym variable (same name) is
created in a local workspace.

You could also use "evalin" and "assignin" for manipulation
variables at different WS.

For mouse position, check out also this:
 get(0, 'PointerLocation')

Bruno