John May

Dr. John May

2741 Reputation

18 Badges

17 years, 88 days
Maplesoft
Pasadena, California, United States

Social Networks and Content at Maplesoft.com

Maple Application Center
I have been a part of the Mathematical Software Group at Maplesoft since 2007. I have a Ph.D in Mathematics from North Carolina State University as well as Masters and Bachelors degrees from the University of Oregon. I have been working on research in computational mathematics since 1997. I currently work on symbolic solvers and visualization as well as other subsystems of Maple.

MaplePrimes Activity


These are replies submitted by John May

I can't seem to replicate this as a bug. In Maple 14,

solve({b4*y^3+b1*x*y^2+b2*x^2*y+b3*x^3, a*y+a1*x+a2*x*y+a3*x^2+a4*y^2}, {x,y});

gives me the same answer as Maple 13 in both 32 and 64 bit Linux.  Are you on a different platform?

I can't seem to replicate this as a bug. In Maple 14,

solve({b4*y^3+b1*x*y^2+b2*x^2*y+b3*x^3, a*y+a1*x+a2*x*y+a3*x^2+a4*y^2}, {x,y});

gives me the same answer as Maple 13 in both 32 and 64 bit Linux.  Are you on a different platform?

Without declaring A first, the assignment "A[i,j]:=lcm(i,j):" implicitly creates a table.  In a case like this example, you know how big your data is, and you know you want it in a Matrix in the end, so you can avoid all the post-processing and table creation overhead by either 1. declaring A to be a matrix before the loop (i.e. "A := Matrix(10,10, 0);") or 2. (preferred) construct A using the Matrix constructor:

A := Matrix(10,10,lcm);

and avoid the loop entirely.

@Clare So I'll be impressed if you can render pac-man navigating his entire maze.

@Robert Israel Oops!  There appears to have been a cut and paste malfunction.  PP actually has a small circle in the middle of the path, so it is a little more complicated than that:

PP := 
[piecewise(t < 0, -(1/8)*t^2,
           t < .8*Pi, -(2/15)*cos(t)*(30*sin(t)+60*sin(t)*cos(t)^6-90*sin(t)*cos(t)^4),
           t < Pi, (1/10)*sin(10*t-8.0*Pi)+.5242497001,
                  -(2/15)*cos(t+.2*Pi)*(-30*sin(t+.2*Pi)-60*sin(t+.2*Pi)
*cos(t+.2*Pi)^6+90*sin(t+.2*Pi)*cos(t+.2*Pi)^4)), piecewise(t < 0, t, t < .8*Pi, 4*sin(t)^2, t < Pi, (1/10)*cos(10*t-8.0*Pi)+.381966011,
 4*sin(t+.2*Pi)^2), piecewise(t < 0, t, 0) ];

I also editted my original post with the correct value of PP to create the plot

@hirnyk I was hoping for daily birth data from Australia, but I used the monthly data you posted to plot Austrailian births from 1998-2007 (2008 Decemeber numbers looked incomplete) renormalized, fit with a curve (using ?CurveFitting,Spline ), and overlaid on the US data:

To my eye it looks a little less seasonal perhaps due to seperate winter and Christmas/New Year conception spikes? (the white month labels at the bottom are the approximate months of conception)

Heres the new worksheet: birthday-distributi.mw

@Robert Israel There is a nice box plot of the weekend phenomena here http://www.stanford.edu/~dgleich/notebook/2009/04/birthday_distribution.html too (using the US 1978 live birth data).  I imagine that a lot of mothers do not want to give birth on Christmas either - that probably also contributes to the dip.

@Axel Vogt I tried to find birth data for Australia (to no avail) to see if that big bump is due to Christmas, or just to winter. :D  If anyone can dig something up, I'd love to see it.

@Robert Israel I had the same problem, but it seems to work fine if I change the main while loop from "p=100" to "p<>0"

while p <> 0 do
   a := Array(1 .. 100, datatype = integer[1]);
   p := Sockets:-ReadBinary(a, sock);
   s(n+1 .. n+p) := a[1 .. p];
   n := n+p;
end do:

@Robert Israel I had the same problem, but it seems to work fine if I change the main while loop from "p=100" to "p<>0"

while p <> 0 do
   a := Array(1 .. 100, datatype = integer[1]);
   p := Sockets:-ReadBinary(a, sock);
   s(n+1 .. n+p) := a[1 .. p];
   n := n+p;
end do:

Here is a shot at an in then out flythrough based on Robert's post:

S:= [-2/15*cos(t)*(3*cos(v)+5*sin(t)*cos(v)*cos(t)-30*sin(t)-60*sin(t)*cos(t)^6
+90*sin(t)*cos(t)^4),
-1/15*sin(t)*(80*cos(v)*cos(t)^7*sin(t)+48*cos(v)*cos(t)^6
-80*cos(v)*cos(t)^5*sin(t)-48*cos(v)*cos(t)^4-5*cos(v)*cos(t)^3*sin(t)
-3*cos(v)*cos(t)^2+5*sin(t)*cos(v)*cos(t)+3*cos(v)-60*sin(t)),
2/15*sin(v)*(3+5*sin(t)*cos(t))];
P := eval(S, {cos(v)=0, sin(v)=0, t=-t});
Q := eval(S, {cos(v)=0, sin(v)=0, t=t+Pi*0.2});

PP:= [piecewise(t<0,-t^2/8,t<.8*Pi,P[1],t<Pi,sin(10*(t-.8*Pi))/10+0.5242497001,Q[1]),
piecewise(t<0,t,t<.8*Pi,P[2],t<Pi,cos(10*(t-.8*Pi))/10+.381966011, Q[2]),
piecewise(t<0,t, 0)];

S:= [S[1],S[3],S[2]];
PP := [PP[1],PP[3],PP[2]];

I found it really helpful to plot the space curve:

sc:=
plots:-spacecurve(PP,t=-1.5..1.7*Pi,color=black,thickness=2);
kb:=plot3d(S, t = 0 .. Pi, v = 0 .. 2*Pi, scaling = constrained, grid=[100, 30], transparency=0.5);
plots:-display([kb,sc]);

And then the plot

plot3d(S, t = 0 .. Pi, v = 0 .. 2*Pi, scaling = constrained, lightmodel = light3, colour=t, grid=[150, 30], 
viewpoint=[path=[PP,t=-1.5..1.65*Pi],look=forward, fieldofview=75, frames=100]);

@Robert Israel I probably should have been more specific, and said "Shannon Entropy" measured just with character counting a la ?StringTools:-Entropy or ?ImageTools:-Entropy .  Clearly that sort of measure can not really say anything about LZ compressibility, but so much of what I found written on the web conflated entropy (typically immediately defined to be Shannon Entropy) with compressibility when as per @JacquesC it would be better to save comparisons to compressibility for information theoritical measures of complexity (or a more subtle discussion of entropy).

@Robert Israel Excellent!

@Robert Israel Very nice!

I'll be impressed if someone can plot one of the actual 2010 World Cup balls: http://en.wikipedia.org/wiki/Adidas_Jabulani

 

John

First 6 7 8 9 10 11 12 Last Page 8 of 19