Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Getting indexes of rows of matrix with more than n repetitions
Date: Wed, 6 Jan 2010 21:54:03 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 23
Message-ID: <hi30pr$nku$1@fred.mathworks.com>
References: <hhudae$4p$1@fred.mathworks.com> <hhuths$led$1@fred.mathworks.com> <hi023t$mtq$1@fred.mathworks.com> <hi1f7i$plv$1@fred.mathworks.com> <hi1g5n$f7i$1@fred.mathworks.com> <hi1ua1$d7e$1@fred.mathworks.com> <hi2300$6dk$1@fred.mathworks.com> <hi24al$3ig$1@fred.mathworks.com> <hi290i$dsp$1@fred.mathworks.com> <hi2fj5$pr2$1@fred.mathworks.com> <hi2gdc$j3u$1@fred.mathworks.com> <hi2im0$fbd$1@fred.mathworks.com> <hi2kg4$b73$1@fred.mathworks.com> <hi2tn1$4e2$1@fred.mathworks.com> <hi2v42$535$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1262814843 24222 172.30.248.38 (6 Jan 2010 21:54:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 6 Jan 2010 21:54:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:597003

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <hi2v42$535$1@fred.mathworks.com>...
> But us, isn't the test unfair when the variable a_i is not properly cleared?
> 
> I add the "clear" command and both syntax fails at the same places (see the new foo below).

bruno - well: NO(!, sorry)...
this were just the points - and:
- let's dissect the stuff once more

1) GOO creates A and B at different mem locs (A & B=A+1)...
2) if their size is too big, GOO itself will fail (trivial)...
3) but let's keep in mind: there's a CALLER's workspace (WS) as well: FOO
4) IT (foo) is filled with a lot of different vars [A_x/B_x] created by
    GOO (again, not failing by itself in each call)
5) however, FOO (now slowly filling up) is failing earlier if BOTH vars are put into its WS

altogether, the snippet intended to simulate a function's WS which is filled by calls to many (in real life: different) subroutines returning a lot of DUMMY(ie)s...
naturally, the (keen) programmer would have to take care of this by adding a CLEAR DUMMY statement after EACH call (because it's there, in the mem and contaminating any subsequent request in a subfunction!) ... quite tedious and ...unlovely...

here, we deal with massive vol data (coming from fmri studies) - and better believe me, we simply could not work with the [a,b] approach...

just a few more pedestrian thoughts...
us