Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: Re: compute distribution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82506] Re: [mg82485] Re: [mg82476] compute distribution
  • From: DrMajorBob <drmajorbob at bigfoot.com>
  • Date: Tue, 23 Oct 2007 05:25:50 -0400 (EDT)
  • References: <19309212.1193049527313.JavaMail.root@m35>
  • Reply-to: drmajorbob at bigfoot.com

Same idea but a little simpler:

Needs["BarCharts`"]
str = "ammmmmstgretsrdhydtudytyhsdefaweshgffdyhsfdhsgfjsdfdsfhkpgfkjgf\
jhkjhfdgkbfsdnfjkdsglhdsjfkgndsjgh";
{labels, counts} = Transpose@Sort@Tally@Characters@str;
BarChart[counts, BarLabels -> labels, ImageSize -> 500]

Tally is new in v6, but Frequencies did something similar in v5.2.

Bobby

On Mon, 22 Oct 2007 04:35:06 -0500, Bob Hanlon <hanlonr at cox.net> wrote:

> $Version
>
> 5.2 for Mac OS X (June 20, 2005)
>
> Needs["Graphics`"];
>
> (* Needs["BarCharts`"]; Version 6 *)
>
> str="ammmmmstgretsrdhydtudytyhsdefaweshgffdyhsfdhsgfjsdfdsfhkpgfkjgfjhkjhfdgkb\
> fsdnfjkdsglhdsjfkgndsjgh";
>
> alpha=CharacterRange["a","z"];
>
> data=StringCount[str, #]&/@alpha;
>
> BarChart[data, BarLabels->alpha,
>     ImageSize->468]
>
>
> Bob Hanlon
>
> ---- vickyisai at gmail.com wrote:
>> Hi ALL
>>
>> How can i compute the distribution of signals fired from a net . there
>> are 26 different signals that can be fired.
>> which is obtained the form below.
>>
>>
>> { ammmmmstgretsrdhydtudytyhsdefaweshgffdyhsfdhsgfjsdfdsfhkpgfkjgfjhkjhfdgkbfsdnfjkdsglhdsjfkgndsjgh}
>>
>> i ma confused with how to show the distribution plot. If i compute the
>> "number of times" each signal has occured, than how it can be
>> plotted.  (like a appears 12 times, b appears 13 times....than
>> frequency of appearance can be represented on y axis but what can i
>> take on x axis.
>>
>> I work on mathematica 5.2
>>
>> thnaks
>>
>> Vick Al Aisa
>>
>>
>
>
>



--

DrMajorBob at bigfoot.com


  • Prev by Date: Mathematica Special Interest Group (Northern VA and Washington DC)
  • Next by Date: ReplaceAll question
  • Previous by thread: Re: compute distribution
  • Next by thread: Satellite Visualization!