Thread Subject: sort data for big value and highest hits

Subject: sort data for big value and highest hits

From: smar

Date: 25 Jan, 2009 17:23:07

Message: 1 of 2


I have a histogram data set A

Col 1 = hits
Col 2 = value


A = [

  118.7300 0.0168
    6.9800 0.0503
    1.6400 0.1845
    1.7900 0.2181
    2.1800 0.2516
    7.7900 0.2852
   31.5700 0.3187
   2.1800 0.2516

]

The answer is value=0.3187 (second last row) which I want to extract form this data set A.
It is based on following constraint


The valve should be bigger that 0.1 and should have highest or second highest hits.

How can I extract this ?
thanks
smar

Subject: sort data for big value and highest hits

From: Joerg Buchholz

Date: 25 Jan, 2009 17:54:07

Message: 2 of 2

"smar " <smar234@yahoo.com> wrote in message <gli75r$isv$1@fred.mathworks.com>...
>
> I have a histogram data set A
>
> Col 1 = hits
> Col 2 = value
>
>
> A = [
>
> 118.7300 0.0168
> 6.9800 0.0503
> 1.6400 0.1845
> 1.7900 0.2181
> 2.1800 0.2516
> 7.7900 0.2852
> 31.5700 0.3187
> 2.1800 0.2516
>
> ]
>
> The answer is value=0.3187 (second last row) which I want to extract form this data set A.
> It is based on following constraint
>
>
> The valve should be bigger that 0.1 and should have highest or second highest hits.
>
> How can I extract this ?
> thanks
> smar

Try to understand the following line of code

find (A(:,1) == max (A(:,1)))

by using

help find
help max
help eq
help colon

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

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.

Tag Activity for This Thread
Tag Applied By Date/Time
homework Joerg Buchholz 25 Jan, 2009 12:55:14
rssFeed for this Thread

Contact us at files@mathworks.com