Christopher2222

MaplePrimes Activity


These are replies submitted by Christopher2222

Usually I find translations between the 3 M's written by someone who is fully versed in 1 language and only partially versed in the others.  Take this location http://amath.colorado.edu/computing/mmm/ someone has shown how a particular operation could be coded in various languages and obviously he was not Maple savvy as many areas of Maple code were left undone and hasn't been updated for quite some time. 

A better similar website could be constructed that would be advantageous to users of all platforms.

I didn't think there was much advancement in that area, as the more important focus (of course) is Maple itself. 

Probably best left up to users to make their own translation and ask for help here.  Makes sense, after-all why should Maple spend time catering to get Mathematica code into Maple.  It is a daunting if not almost impossible task to get perfect anyway.

The last revision of a Maple converter for Mathematica was 1998 !  I am sure Wolfram has dropped all developement in that area and has focused on the core itself.  Unless Maple has spare resources to devote improving or upgrading the Mma translator then I guess it doesn't really make sense to.  It's not really a value added option for Maple anyway... well, it is kind of, but it doesn't outweigh the benefits if those resources were concentrated on the core product. 

 

 

I didn't think there was much advancement in that area, as the more important focus (of course) is Maple itself. 

Probably best left up to users to make their own translation and ask for help here.  Makes sense, after-all why should Maple spend time catering to get Mathematica code into Maple.  It is a daunting if not almost impossible task to get perfect anyway.

The last revision of a Maple converter for Mathematica was 1998 !  I am sure Wolfram has dropped all developement in that area and has focused on the core itself.  Unless Maple has spare resources to devote improving or upgrading the Mma translator then I guess it doesn't really make sense to.  It's not really a value added option for Maple anyway... well, it is kind of, but it doesn't outweigh the benefits if those resources were concentrated on the core product. 

 

 

We can weed out an ellagant solution later.  Can we see a base maple code to start from?

We can weed out an ellagant solution later.  Can we see a base maple code to start from?

I have taken the liberty to transcribe your code into maple.

 

restart; gc()

``

with(linalg):

RenderData := proc (adjacency, data) local i, j, pt, ptlist; ptlist := NULL; for i to coldim(data) do for j to coldim(data) do if adjacency[i, j] = 1 then pt := map(convert, [col(data, i), col(data, j)], list); ptlist := ptlist, pt end if end do end do; plot([ptlist], view = [-12 .. 12, -12 .. 12], color = blue, axes = none, scaling = constrained) end proc:

b := 0;

10

(1)

d := 25;

25

(2)

C := matrix([[2, 0, 2, 0, 2, 0, 2, 0], [2, 2, 2, 2, 0, 0, 0, 0], [0, 0, 2, 2, 2, 2, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1]]);

C := Matrix(4, 8, {(1, 1) = 2, (1, 2) = 0, (1, 3) = 2, (1, 4) = 0, (1, 5) = 2, (1, 6) = 0, (1, 7) = 2, (1, 8) = 0, (2, 1) = 2, (2, 2) = 2, (2, 3) = 2, (2, 4) = 2, (2, 5) = 0, (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 2, (3, 4) = 2, (3, 5) = 2, (3, 6) = 2, (3, 7) = 0, (3, 8) = 0, (4, 1) = 1, (4, 2) = 1, (4, 3) = 1, (4, 4) = 1, (4, 5) = 1, (4, 6) = 1, (4, 7) = 1, (4, 8) = 1})

(3)

A := matrix([[0, 1, 1, 0, 0, 0, 1, 0], [1, 0, 0, 1, 0, 0, 0, 1], [1, 0, 0, 1, 1, 0, 0, 0], [0, 1, 1, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 1, 1, 0], [0, 0, 0, 1, 1, 0, 0, 1], [1, 0, 0, 0, 1, 0, 0, 1], [0, 1, 0, 0, 0, 1, 1, 0]])

A := Matrix(8, 8, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (1, 7) = 1, (1, 8) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (2, 4) = 1, (2, 5) = 0, (2, 6) = 0, (2, 7) = 0, (2, 8) = 1, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0, (3, 4) = 1, (3, 5) = 1, (3, 6) = 0, (3, 7) = 0, (3, 8) = 0, (4, 1) = 0, (4, 2) = 1, (4, 3) = 1, (4, 4) = 0, (4, 5) = 0, (4, 6) = 1, (4, 7) = 0, (4, 8) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 1, (5, 4) = 0, (5, 5) = 0, (5, 6) = 1, (5, 7) = 1, (5, 8) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 1, (6, 5) = 1, (6, 6) = 0, (6, 7) = 0, (6, 8) = 1, (7, 1) = 1, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 1, (7, 6) = 0, (7, 7) = 0, (7, 8) = 1, (8, 1) = 0, (8, 2) = 1, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 1, (8, 7) = 1, (8, 8) = 0})

(4)

P1 := Matrix([[1, 0, -b/d, 0], [0, 1, -c/d, 0], [0, 0, 0, 0], [0, 0, -1/d, 1]])

P1 := Matrix(4, 4, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = -2/5, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = -1/25, (4, 4) = 1})

(5)

f := 2

2

(6)

c := 10

10

(7)

anim1 := NULL:

with(plots):

display([anim1], insequence = true);

 

P2 := matrix([[1, 0, 0, 0], [0, cos(theta), -sin(theta), 0], [0, sin(theta), cos(theta), 0], [0, 0, 0, 1]])

P2 := Matrix(4, 4, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = cos(theta), (2, 3) = -sin(theta), (2, 4) = 0, (3, 1) = 0, (3, 2) = sin(theta), (3, 3) = cos(theta), (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 1})

(8)

anim2 := NULL; for f to 5 do P2 := matrix([[1, 0, 0, 0], [0, cos(theta), -sin(theta), 0], [0, sin(theta), cos(theta), 0], [0, 0, 0, 1]]); newC := evalm(`&*`(P2, C)); M := Matrix(2, coldim(newC), proc (i, j) options operator, arrow; newC[i, j]/newC[4, j]+f end proc); anim2 := anim2, RenderData(A, M) end do

Warning, unable to evaluate 14 of the 24 functions to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

 

display([anim2], insequence = true)

 

P3 := matrix([[cos(theta), 0, sin(theta), 0], [0, 1, 0, 0], [-sin(theta), 0, cos(theta), 0], [0, 0, 0, 1]])

P3 := Matrix(4, 4, {(1, 1) = cos(theta), (1, 2) = 0, (1, 3) = sin(theta), (1, 4) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = 0, (3, 1) = -sin(theta), (3, 2) = 0, (3, 3) = cos(theta), (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 1})

(9)

anim3 := NULL:

Warning, unable to evaluate 14 of the 24 functions to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

 

display([anim3], insequence = true)

 

``

 

Download mapleprimes_3d_cub.mw

Hm.  I did not realize they were the same as the bytes conversion. 

Hm.  I did not realize they were the same as the bytes conversion. 

Maybe it would be perhaps better to post a maple worksheet, rather than a movie wmv file?

An extreme case of genetic drift is known as the founder effect.

I would like to point out that the proposterous idea of countries needing to protect themselves from zombie outbreaks might not be so rediculous.  Far fetched yes but is it really?  Should a few strange people be left stranded on an island, the idea of a zombie nation is possible.  Unfortunately the very nature of a zombie is to consume others so really they would just basically wipe themselves out. 

Both genetic drift and the founder effect have interesting effects on the human population.  I didn't really use much of maple here but the idea was interesting enough.  With a little more thought and time, a better presentation could be made with Maple. 


An extreme case of genetic drift is known as the founder effect.  If a small number of individuals migrate off to found a new population they may carry allels  in different relative frequencies from the main population (Allels - two or more forms of a single gene).

 

Again we can use Maple rather simply to simulate a demonstration of how it works.

 

Imagine a jar of 5000 jellybeans, containing five equal colors.  Pouring half of the jar out, you'll find roughly equal numbers of all five colors.  But picking out only 3 jellybeans at random you'll be missing at least 2 of the colors present in the main population.  You could concievably end up with 3 of one color as you can see in the following simulation.  

 

restart; gc()

a := [seq(seq(j, j = 1 .. 5), i = 1 .. 5000)]:#numbers representing 5 colors

with(combinat): 

count := 0; do b := randcomb(a, 3); print(b); count := count+1; if numbperm(b) = 1 then break end if end do; print("It took", count, " samplings to select all one value")
                                  [2, 3, 2]
                                  [1, 3, 4]
                                  [3, 3, 2]
                                  [1, 2, 4]
                                  [1, 4, 1]
                                  [4, 3, 1]
                                  [2, 5, 2]
                                  [1, 2, 4]
                                  [1, 2, 1]
                                  [1, 2, 3]
                                  [1, 4, 3]
                                  [2, 1, 1]
                                  [4, 4, 1]
                                  [5, 4, 5]
                                  [4, 1, 1]
                                  [4, 1, 1]
                                  [5, 4, 2]
                                  [4, 4, 4]
           "It took", 18, " samplings to select all of one value"



"It took", 18, " samplings to select all of one value"


(1)

The founder effect can be especially important in places such as Hawaii or the Galapagos islands where the populations of mainland species may be established by a handful of wanderers.  Madagascar is one example of where lemurs have become completely different from lemurs elsewhere.  Even within humans there are well-documented cases of the founder effect, where the mingling of their gene pool with the surrounding community is forbidden.  An example is the Amish community in Pennsylvania, an orthodox religous group founded by a very small number of immigrants and allows no marriage to outsiders.  Among the founders was a Mr. and Mrs. Samuel King.  The Kings happen to carry a recessive allele that causes dwarfism, the growth of extra fingers, and heart defects.  In the outside world the frequency of this allele is less than 1 in 1000 but in this Amish community it occurs at about 1 in 14.

 

 

Just for fun we could put our little experiment into a procedure to observe sample sizes for different selection sizes

``

``

NULL

 
foundereffect := proc (pop, diff, sel) local a, b, count; count := 0; a := [seq(seq(j, j = 1 .. diff), i = 1 .. pop/diff)]; do b := combinat:-randcomb(a, sel); print(b); count := count+1; if combinat:-numbperm(b) = 1 then break end if end do; print("It took", count, " samplings to select all one value") end proc:

foundereffect(9, 3, 3)

 

"It took", 7, " samplings to select all one value"

(2)

For larger selection sizes, it would be wise to suppress the print outrput.

 

 

NULL


Download foundereffect2.mw

Yes, okay adding the left=min(data),right=max(data) is what I wanted for capping. 

Regarding tipped, what I mean is shrinking the scale of the kerneldensityplot (no specified range) so that the plot ends on the upper and lower bounds of the data.

Yes, okay adding the left=min(data),right=max(data) is what I wanted for capping. 

Regarding tipped, what I mean is shrinking the scale of the kerneldensityplot (no specified range) so that the plot ends on the upper and lower bounds of the data.

Yes sorry, I am referring to the tickmark labels.

Just noticed something in boxplot.

When deciles=true not all points are displayed as small symbols.  Shouldn't they be? 

Bee swarm plot, bean plot and violin plots could be nice quick small additions to the Statistics plot options. 

Just noticed something in boxplot.

When deciles=true not all points are displayed as small symbols.  Shouldn't they be? 

Bee swarm plot, bean plot and violin plots could be nice quick small additions to the Statistics plot options. 

First 86 87 88 89 90 91 92 Last Page 88 of 162