Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Taking average of specific data from a data set
Replies: 2   Last Post: Feb 7, 2013 8:50 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
jomarbueyes@hotmail.com

Posts: 186
Registered: 3/7/05
Re: Taking average of specific data from a data set
Posted: Feb 7, 2013 3:33 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Thursday, February 7, 2013 3:00:12 PM UTC-5, Mohammad wrote:
> Data= 0.11,( -1.11, -0.75), -0.02, -0.36, (-0.97), -0.35, (-1.02, -1.33, -1.00), -0.15, (-0.66, -0.59, -1.21, -0.70), 0.06, (-1.65), 0.03, 0.25, (-1.35), -0.08,(-0.91, -0.82, -1.29), -0.26
>
>
>
> In this data set 7 events have values less than -0.5. ( ) indicate one event, this is for better understanding, don't have in real data. My purpose is to take average of each event > sum all of this average > again divide this sum by total number of events (i.e.7).
>
>
>
> This process will repeat for 40 data set. Thanks in advance for your help.
>
>
>
> Badrul


Hi Badrul,

I'm not sure I fully understand your question. If you want to process only those elements greater than or equal to -0.5, you can extract them from the 'Data' array by

newData = Data(Data >= -0.5);

If you only want the sum, not to extract them, you can do that by

total = sum( Data(Data >= -0.5) );


HTH

Jomar




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.