Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11160 > unrolled thread

Re: Data Format

Started byBob Hanlon <hanlonr357@gmail.com>
First post2012-08-02 08:47 +0000
Last post2012-08-02 08:47 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Data Format Bob Hanlon <hanlonr357@gmail.com> - 2012-08-02 08:47 +0000

#11160 — Re: Data Format

FromBob Hanlon <hanlonr357@gmail.com>
Date2012-08-02 08:47 +0000
SubjectRe: Data Format
Message-ID<jvdeqa$c01$1@smc.vnet.net>
list = {
   "C1" -> {5.`, 4.`, 7.`, 3.`, 6.`, 6.`, 7.`, 1.`, 5.`, 6.`},
   "C2" -> {2.`, 5.`, 6.`, 7.`, 7.`, 1.`, 5.`, 4.`, 7.`, 2.`}};

{C1, C2} = Last /@ list;

Mean[C1]

5.

Mean /@ {C1, C2}

{5., 4.6}


Bob Hanlon


On Wed, Aug 1, 2012 at 4:58 AM, Nicholas Kormanik <nkormanik@gmail.com> wrote:
>
> Please consider the following code, which is data imported directly into
> Mathematica via a .mtp file (Minitab Portable Worksheet), and then using
> list assignment:
>
>     list = {"C1" -> {5.`, 4.`, 7.`, 3.`, 6.`, 6.`, 7.`, 1.`, 5.`, 6.`}, "C2"
> -> {2.`, 5.`, 6.`, 7.`, 7.`, 1.`, 5.`, 4.`, 7.`, 2.`}}
>
> The following two commands work:
>
>     Mean["C1" /. list]
>
>     Mean["C2" /. list]
>
> However I would prefer to be able to issue the following commands instead:
>
>     Mean[C1]
>
>     Mean[C2]
>
> How can the code at top be converted so that these simpler commands will
> work?
>
> Thanks.
>
> Nicholas Kormanik
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web