MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Mean Values

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112922] Re: Mean Values
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Wed, 6 Oct 2010 03:14:45 -0400 (EDT)
  • References: <i8eri9$hvk$1@smc.vnet.net>
  • Reply-to: nma at 12000.org

On 10/5/2010 2:36 AM, cubsfan334 wrote:
> Hi,
>
> I have a text file of over 100,000 values, and I'd like to have Mathematica
 > take the average of certain values I specify.  For example,
 >after I read in the file, is there a command that could take the mean
 > of, say, values 23000 - 48000?
>
> Thanks!
>

Can't you just use the Mean function?

After you read the file to an array, just do Mean. Example

A = RandomReal[1, 10];
Mean[A[[3 ;; 7]]]

Many way to import data in Mathematica, do help on Import.

hth

--Nasser





  • Prev by Date: Re: Mean Values
  • Next by Date: change the base of the Log[] used by LogLogPlot?
  • Previous by thread: Re: Mean Values
  • Next by thread: Re: Mean Values