Re: How to take mean of specific data?
- To: mathgroup at smc.vnet.net
- Subject: [mg112929] Re: How to take mean of specific data?
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Wed, 6 Oct 2010 03:16:07 -0400 (EDT)
On 10/5/10 at 5:34 AM, cubsfan334 at gmail.com (cubsfan334) wrote: >I have a text file with over 100,000 different values. After >importing this data into Mathematica, I'd like to have the program >average specific parts of this data. For example, I'd like to find >the mean of values 18,000 to 67,500. Is there some variation of the >'Mean' command or other that would do this? Once you have read your data into Mathematica it is very simple to do what you want. Assume, the variable myData contains the data, then Mean[myData[[18000;;67500]]] will do what you want. Note, this assumes the data is in a 1-D list. If this is not the case or you need hints on how to read the data into Mathematica, post some details of the format of the text file.