John May

Dr. John May

3026 Reputation

18 Badges

17 years, 320 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

This appears to be a bug in the '!!!' button.  I will make sure it is reported.  

Just to expand a little.  It is possible to discover the equivalence of "find" and ?ArrayTools[SearchArray] using ?Matlab,FromMatlab

(**) Matlab:-FromMatlab("find(X)", evaluate=false);
#                          ArrayTools:-SearchArray(X)

Just to expand a little.  It is possible to discover the equivalence of "find" and ?ArrayTools[SearchArray] using ?Matlab,FromMatlab

(**) Matlab:-FromMatlab("find(X)", evaluate=false);
#                          ArrayTools:-SearchArray(X)

Ah! I tried every possible entry method except 1-D input in Document mode.

Ah! I tried every possible entry method except 1-D input in Document mode.

I can't replicate this in my local install of Maple 14 in 64 bit Linux:



kernelopts(version);

(1)

restart; printlevel:=100; for i from 1 to 2 do for j from 1 to 2 do k:=i+j end do end do;

 

 

 

 

(2)

 

 

 

 

(3)

 



Download printlevel_test.mw

What platform are you using?

 

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:
First 6 7 8 9 10 11 12 Last Page 8 of 19