MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > combining arrays 

I have six arrays, A1, ... ,A6, each with about 50K rows and exactly two columns. The first column of each array is a strictly increasing sequence of nonnegative integers. The second column consists of doubles between 0 and 1. 
"David Epstein" <David.Epstein.spam@remove.warwick.ac.uk> wrote in message <i882sb$hfj$1@fred.mathworks.com>... 
"David Epstein" <David.Epstein.spam@remove.warwick.ac.uk> wrote in message <i882sb$hfj$1@fred.mathworks.com>... 
> A1 = ceil(20*rand(12,1)); 
"Roger Stafford" 
PS to post#4, Using directly SPARSE is more readable: 
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <i88bv0$po9$1@fred.mathworks.com>... 
Alternatively, (using Bruno's data but ensuring strictly increasing ids), 
oops...should have had 
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <i88cdv$pll$1@fred.mathworks.com>... 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <i88m57$djc$1@fred.mathworks.com>... 
Hi all, 
>  What I don't know is what kind of sorting algorithm SPARSE command uses. Most known algorithms will be O(n*(log(n)) in average on *unsorted* input, but it can be either O(n), O(n*log(n)) or O(n^2) on sorted input (the classical example of quicksort with bad pivot selection). My claims above work only when it's O(n). 
"Oleg Komarov" <oleg.komarovRemove.this@hotmail.it> wrote in message <i89n13$1o5$1@fred.mathworks.com>... 
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <i89a8f$n3p$1@fred.mathworks.com>... 
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <i8cvgq$due$1@fred.mathworks.com>... 
"David Epstein" <David.Epstein.spam@remove.warwick.ac.uk> wrote in message <i8d3ak$smn$1@fred.mathworks.com>... 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.