From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Call by reference / references
Date: Fri, 5 Mar 2010 15:51:21 +0000 (UTC)
Organization: Xoran Technologies
Lines: 22
Message-ID: <hmr99p$35t$>
References: <fgv1uh$hj2$> <> <> <hmr6ut$2fg$> <hmr8ds$7uh$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1267804281 3261 (5 Mar 2010 15:51:21 GMT)
NNTP-Posting-Date: Fri, 5 Mar 2010 15:51:21 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: comp.soft-sys.matlab:614196

"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hmr8ds$7uh$>...

> function test(ob)
>*a,,'uni',0); %double all cell elements
> end

Sorry, bad example. You would need to implement test.m this way, to avoid a complete new copy of inside its workspace

 function test(ob)

  for ii=1:length({ii}{ii}*2;


Anyway, the point is, the copy of being manipulated inside test.m is exactly the one in your base workspace. So, you wouldn't get an out-of-memory error in larger sized examples.