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$>
References: <hhudae$4p$> <hhuths$led$> <hi023t$mtq$> <hi1f7i$plv$> <hi1g5n$f7i$> <hi1ua1$d7e$> <hi2300$6dk$> <hi24al$3ig$> <hi290i$dsp$> <hi2fj5$pr2$> <hi2gdc$j3u$> <hi2im0$fbd$> <hi2kg4$b73$> <hi2tn1$4e2$> <hi2v42$535$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1262814843 24222 (6 Jan 2010 21:54:03 GMT)
NNTP-Posting-Date: Wed, 6 Jan 2010 21:54:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: comp.soft-sys.matlab:597003

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <hi2v42$535$>...
> 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...