Re: Mathematica 6.0 easier for me ... (small review)
- To: mathgroup at smc.vnet.net
- Subject: [mg76585] Re: Mathematica 6.0 easier for me ... (small review)
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 24 May 2007 06:08:55 -0400 (EDT)
- Organization: Uni Leipzig
- References: <f30vpv$mkn$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi, lis = {{1, 10}, {2, 10}, {9, 10}, {11, 20}, {12, 20}, {19, 20}, {11, 30}, {12, 30}, {13, 30}}; Partition[lis, 2, 1] /. {{_, a_}, {_, a_}} :> Sequence[] should return a list of all pairs where the second enty change. Regards Jens 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 > would add: > > ToBase[{"String",NumberBaseFrom}, > NumberBaseTo, > Pad digits (optional)] > ToBase[{Number,10}, > NumberBaseTo, > Pad digits (optional)] > > 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, > Pad digits (optional)] > ToBase[Number, > 10, (*Implicit, but still stated for consistency *) > NumberBaseTo, > Pad digits (optional)] > > 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 >