From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: combining arrays
Date: Sat, 2 Oct 2010 22:41:04 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 11
Message-ID: <i88cdv$pll$>
References: <i882sb$hfj$> <i88774$oh7$> <i88bhr$6a$> <i88bv0$po9$>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1286059264 26293 (2 Oct 2010 22:41:04 GMT)
NNTP-Posting-Date: Sat, 2 Oct 2010 22:41:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: comp.soft-sys.matlab:675355

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <i88bv0$po9$>...
> PS to post#4, Using directly SPARSE is more readable:
> m=max(A1(end),A2(end))
> A12 = find(sparse(A1,1,true,m,1)+ sparse(A2,1,true,m,1))
> Bruno

PS again: actually I don't know what kind of complexity i.e., O(n) or O(n*log(n), when SPARSE is invoked with the input indexes that are already sorted.