Path: news.mathworks.com!newsfeed-00.mathworks.com!NNTP.WPI.EDU!elk.ncren.net!news2.wam.umd.edu!bloom-beacon.mit.edu!llnews!53ab2750!not-for-mail
Newsgroups: comp.soft-sys.matlab
Subject: Re: Variable addresses?
References: <f72smj$3ed$1@fred.mathworks.com>
From: Peter Boettcher <boettcher@ll.mit.edu>
Message-ID: <muyvecjouxx.fsf@G99-Boettcher.llan.ll.mit.edu>
Organization: MIT Lincoln Laboratory
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.98 (gnu/linux)
Cancel-Lock: sha1:1lcPdEEKz7t4nz4V2oqL9mhCgGI=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 27
Date: Tue, 17 Jul 2007 12:29:14 -0400
NNTP-Posting-Host: 155.34.163.114
X-Complaints-To: news@ll.mit.edu
X-Trace: llnews 1184689510 155.34.163.114 (Tue, 17 Jul 2007 12:25:10 EDT)
NNTP-Posting-Date: Tue, 17 Jul 2007 12:25:10 EDT
Xref: news.mathworks.com comp.soft-sys.matlab:419537



"Eric " <toolson@unm.edu> writes:

> Hello - 
>
>     Is it possible to get Matlab to display the hexadecimal address
>     of Workspace variables?  I'm teaching Matlab programming to
>     mathematical biology students, and since they have no
>     programming experience at all, I would like to show them exactly
>     what's happening when they create/initialize variables.

Hex addresses have more to do with the implementation of MATLAB and
not the semantics of the language.  True, it is important to be
familiar with levels of abstraction lower than the level you're
programming in, but it's hardly the place to start for beginning
programmers... I would stick with the behavior/semantics of the MATLAB
language for the base.

Image teaching C programming, and in the first semester explaining how
malloc works: C library, brk() system call, page faults, difference
between virtual/kernel/physical memory addresses, modification of the
hardware page table, etc.  A partial taste of all this stuff is
probably worse than a simple model for how malloc behaves, followed by
a later class in operating systems.

Just my (NS)HO

-Peter