Re: Mathematica 6.0 easier for me ... (small review)

• To: mathgroup at smc.vnet.net
• Subject: [mg76568] Re: [mg76457] Mathematica 6.0 easier for me ... (small review)
• From: DrMajorBob <drmajorbob at bigfoot.com>
• Date: Thu, 24 May 2007 06:00:07 -0400 (EDT)
• References: <32053837.1179929452540.JavaMail.root@m35>

```Some of this might be useful for #4.

Clear[different, same]
different[{a_, b_}, {c_, b_}] = False;
different[{a_List, b_List}] = different[a, b];
different[__] = True;
same[x__] := ! different[x]
lis = {{1, 10}, {2, 10}, {9, 10}, {11, 20}, {12, 20}, {19, 20}}

{{1, 10}, {2, 10}, {9, 10}, {11, 20}, {12, 20}, {19, 20}}

Split[lis, same]

{{{1, 10}, {2, 10}, {9, 10}}, {{11, 20}, {12, 20}, {19, 20}}}

Select[Partition[lis, 2, 1], different]

{{{9, 10}, {11, 20}}}

Clear[search]
search[x_List] :=
Flatten@Position[Partition[x, 2, 1], pair_?different, 1]
search[lis]

{0, 3}

Bobby

On Wed, 23 May 2007 03:59:18 -0500, <Paul at desinc.com> wrote:

> This is far from an in depth review.  I have been working on a fun
> problem and have had difficulty making progress with 5.2.  Something
> about 6.0 made it easier and I finally solved it.  I think it is the
> following:
>
> 1.  Mathematica 6.0 is higher speed/lower drag.  I find myself using
> things I used to groan about looking up for the millionth time.  I
> think Wolfram really listened to all the little gripes.  I believe the=

> liberty of the "obvious use" is indespensable.  Never having to look
> up Display again to suppress output!!!  The language is becoming much
> more consistent.  ";" suppresses output!
>
> 2.  In addition, I like the new google style help.  I wish it would
> default to typing so I didn't have to delete what was there.  Or at
> least highlight it.
>
> 3.  What wasn't there is finally there.  The graphics commands are
> MUCH, MUCH better. Rotatable graphics that stay rotated when rendering=

> again is awesome.  I'm also addicted to Manipulate[].  Most
> incredible.
>
> 4.  At work, I haven't had to resort to other programs because
> Mathematica wasn't the best choice.  This is extremely nice.  BTW,
> There's a "temporal" advantage with procedural programming that hasn't=

> been apparant to me in functional or rule.  Still working on it. Maybe=

> someone can help.  If I have
> lis={{1,10},{2,10},...{9,10},{11,20},{12,20}...{19,20}
>
> How do I use functional and/or rule to determine where the second
> number (lis[[i,2]]) jumped from 10 to 20 to 30 and save the pair.
> Assuming there was noise, I only want to store the first 10->20, then
> look for 20->30 and so on.  So in time, I want my search to change as
> I progress through the list.  Any input appreciated!
>
> 5. What is there, is better.  ListPlot is one example.  I am using
> colors features that were less accessible to me in 5.2.
>
> 6.  Very few gotchas.  I have only found one, though it keeps biting
> me.  If I have two lists, one from 0-100 in both axis and the other
> from 0-1000 in both axis, Show[] will truncate!
>
> lisA = Table[i^2, {i, 0, 1000}];
> lisB = Table[i, {i, 0, 100}];
> p1 = ListPlot[lisA, Joined -> True];
> p2 = ListPlot[lisB, Joined -> True];
> Show[p1, p2]
> Show[p2, p1]
>
> The first plot parameter to Show[] determines truncation.  5.2 did not=

> do this!!  Of course, change Joined to PlotJoined for 5.2.  A small
> gotcha, but never the less a gotcha that burned me once already.  My
> fault.  New is not worse, just different.  To me, Show[] simply
> Showed.  Now it is not.  PlotRange->All fixes this.  I wish there was
> a way to default to All for Show[].
>
> One small, small inconsitency is BaseX number handling.  BaseForm
> outputs some pretty to the eye format, but is harder to work with.  I
>
> ToBase[{"String",NumberBaseFrom},
>            NumberBaseTo,
> ToBase[{Number,10},
>             NumberBaseTo,
>
> Output rules would be {"String",BaseNumber} when NaseNumber was not
> equal to 10.  Or {Number,10}.  If someone wants to use this, they will=

> need to know lists.  This is a highly re-usable skill.  To convert a
> list of binary strings is somewhat sumbersome.
>
> lis = {"1111", "0100"};
> Map[ ToExpression["2^^" <> #] &, lis]
>
> Not exactly intuitive based on other experiences with Mathematica.
> Still do able.  I guess the other way, the user must create:
> lis = {{"1111",2}, {"0100",2}};
>
> Maybe
> ToBase[String,
>            NumberBaseFrom,
>            NumberBaseTo,
> ToBase[Number,
>            10,   (*Implicit, but still stated for consistency  *)
>            NumberBaseTo,
>
> ToBase["1111", 2, 10]
> 15
>
> ToBase[15, 10, 2, 8]
> "00001111"
>
> The user would have to keep track of what base the string was in. This=

> is probably a lot easier than anything else.
>
> I go through this to indicate I have trouble thinking of anything
> defintively better.  I don't envy Wolfram's task in continually
> improving Mathematica.  I appreciate the results.
>
>
>
> Nice job to Wolfram.  Can't wait to see 6.1 :)
>
> Best Regards,
> Paul
>
>

-- =

DrMajorBob at bigfoot.com

```

• Prev by Date: Re: Re: Weird result in Mathematica 6
• Next by Date: Re: Re: Re: Re: Re: 6.0 not seeing style
• Previous by thread: Re: Mathematica 6.0 easier for me ... (small review)
• Next by thread: I Need to Have These Equations Solved!