MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > second largest element in a matrix 

Subject: second largest element in a matrix From: Oluwa KuIse Date: 19 Sep, 2008 02:46:01 Message: 1 of 36 
Hello, 
Subject: second largest element in a matrix From: stephanie Date: 19 Sep, 2008 04:39:02 Message: 2 of 36 
"Oluwa KuIse" <wespeakforex@yahoo.com> wrote in message <gav3p9$som$1@fred.mathworks.com>... 
Subject: second largest element in a matrix From: Steven Lord Date: 19 Sep, 2008 04:47:25 Message: 3 of 36 

Subject: second largest element in a matrix From: Oluwa KuIse Date: 19 Sep, 2008 05:22:01 Message: 4 of 36 
"Call SORT with two output arguments." 
Subject: second largest element in a matrix From: Pekka Date: 19 Sep, 2008 05:55:03 Message: 5 of 36 
"Oluwa KuIse" <wespeakforex@yahoo.com> wrote in message <gavctp$8tv$1@fred.mathworks.com>... 
Subject: second largest element in a matrix From: Oluwa KuIse Date: 19 Sep, 2008 16:38:02 Message: 6 of 36 
It worked! Thanks 
Subject: second largest element in a matrix From: Greg Heath Date: 21 Sep, 2008 09:39:43 Message: 7 of 36 
On Sep 19, 12:47=A0am, "Steven Lord" <sl...@mathworks.com> wrote: 
Subject: second largest element in a matrix From: Walter Roberson Date: 24 Sep, 2008 05:05:36 Message: 8 of 36 
Oluwa KuIse wrote: 
Subject: second largest element in a matrix From: Justin Date: 4 Mar, 2009 22:24:01 Message: 9 of 36 
one straight forward method is to build a length L sorted list, and for each element in te matrix, insert it into the list which cost logL, and discard the smallest element. Totally this cost nlogL. I am also looking for a simple function that finds the second largest element..... don't know if matlab has one 
"Oluwa KuIse" <wespeakforex@yahoo.com> wrote in message <gav3p9$som$1@fred.mathworks.com>... 
"Oluwa KuIse" <wespeakforex@yahoo.com> wrote in message <gav3p9$som$1@fred.mathworks.com>... 
Subject: second largest element in a matrix From: Matt Fig Date: 3 Apr, 2009 23:58:02 Message: 12 of 36 
"Paul " <pswirhun@comcast.net> wrote in message 
Subject: second largest element in a matrix From: Matt Fig Date: 4 Apr, 2009 00:16:02 Message: 13 of 36 
This may work though. The speed gain over the sorting is not tremendous because max is called twice. 
Subject: second largest element in a matrix From: Matt Fig Date: 4 Apr, 2009 00:16:02 Message: 14 of 36 
This may work though. The speed gain over the sorting is not tremendous because max is called twice. 
Subject: second largest element in a matrix From: Walter Roberson Date: 4 Apr, 2009 03:09:42 Message: 15 of 36 
Matt Fig wrote: 
Subject: second largest element in a matrix From: Matt Fig Date: 4 Apr, 2009 03:28:02 Message: 16 of 36 
Walter Roberson <roberson@hushmail.com> wrote in message <qbABl.1289$0%2.625@newsfe22.iad>... 
Subject: second largest element in a matrix From: Bruno Luong Date: 6 Apr, 2009 18:29:01 Message: 17 of 36 
Walter Roberson <roberson@hushmail.com> wrote in message <STjCk.14881$Il.4473@newsfe09.iad>... 
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <grdhld$577$1@fred.mathworks.com>... 
Subject: second largest element in a matrix From: Bruno Luong Date: 6 Apr, 2009 21:02:01 Message: 19 of 36 
"Jos " <#10584@fileexchange.com> wrote in message <grdprt$t4l$1@fred.mathworks.com>... 
Subject: second largest element in a matrix From: Bruno Luong Date: 7 Apr, 2009 00:04:01 Message: 20 of 36 
I have implemented the MIN by partial quicksort in MEX. Any comment is welcome. As soon as I get the MAX going, it will be on FEX. 
Subject: second largest element in a matrix From: Matt Fig Date: 7 Apr, 2009 00:34:01 Message: 21 of 36 
Nicely done Bruno! I do have one observation, merely for you to consider. It would seem to me that when calling 
Subject: second largest element in a matrix From: Bruno Luong Date: 7 Apr, 2009 07:05:04 Message: 22 of 36 
Hello Matt, 
Subject: second largest element in a matrix From: Bruno Luong Date: 7 Apr, 2009 16:28:01 Message: 23 of 36 
Here we go http://www.mathworks.com/matlabcentral/fileexchange/23576 
On 11/7/2012 2:04 PM, sssbi2009@gmail.com wrote: 
Subject: second largest element in a matrix From: tilindg1@gmail.com Date: 4 May, 2013 23:14:45 Message: 25 of 36 
El jueves, 18 de septiembre de 2008 21:46:01 UTC5, Oluwa KuIse escribi: 
Subject: second largest element in a matrix From: Nasser M. Abbasi Date: 5 May, 2013 00:54:39 Message: 26 of 36 
On 5/4/2013 6:14 PM, tilindg1@gmail.com wrote: 
On 5/4/2013 7:54 PM, Nasser M. Abbasi wrote: 
Subject: second largest element in a matrix From: Nasser M. Abbasi Date: 5 May, 2013 04:12:10 Message: 28 of 36 
On 5/4/2013 9:59 PM, dpb wrote: 
Subject: second largest element in a matrix From: Bruno Luong Date: 5 May, 2013 09:21:07 Message: 29 of 36 
> On 5/4/2013 7:54 PM, Nasser M. Abbasi wrote: 
Subject: second largest element in a matrix From: Nasser M. Abbasi Date: 5 May, 2013 10:06:43 Message: 30 of 36 
On 5/5/2013 4:21 AM, Bruno Luong wrote: 
Subject: second largest element in a matrix From: Bruno Luong Date: 5 May, 2013 10:17:09 Message: 31 of 36 
"Nasser M. Abbasi" wrote in message <km5ave$8ff$1@speranza.aioe.org>... 
On 5/4/2013 11:12 PM, Nasser M. Abbasi wrote: 
Subject: second largest element in a matrix From: Nasser M. Abbasi Date: 5 May, 2013 19:48:14 Message: 33 of 36 
On 5/5/2013 9:31 AM, dpb wrote: 
Subject: second largest element in a matrix From: Nasser M. Abbasi Date: 5 May, 2013 20:20:51 Message: 34 of 36 
On 5/5/2013 2:48 PM, Nasser M. Abbasi wrote: 
Subject: second largest element in a matrix From: TideMan Date: 6 May, 2013 00:00:08 Message: 35 of 36 
On Monday, May 6, 2013 8:20:51 AM UTC+12, Nasser M. Abbasi wrote: 
Subject: second largest element in a matrix From: Steven_Lord Date: 6 May, 2013 02:45:43 Message: 36 of 36 

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.