Christopher2222

MaplePrimes Activity


These are replies submitted by Christopher2222

That's a very nice extension to your earlier post. 

To play around a little more, we could also check out the frequencies of numbers that occur in each of the six positions.  Using the data within your worksheet, we'll create 6 sets of lists and then plot the histogram for each one.  And we can visualize the distribution pattern within each position.

for j from 1 to 6 do
  position||j:=[seq(op(Data649[i,2])[j],i=1..nops(Data649))]:
end do:

with(Statistics):
for k from 1 to 6 do
Histogram(position||6,frequencyscale=absolute,bincount=1,range=0..50);
end do;









**edit**  I re-edited for bincount=1

At first it appeared this did not exist in Maple 14, but the value got cut off after 9 zeros so it didn't show. 

So I forced to show it with evalf(b[4,4],27) and the result is surprisingly a different number not by much but different nonetheless.

Maple 12 result : 858.000000000000114

Maple 13 result : 858.000000000000114

Maple 14 result : 858.000000000000118

As I wondered earlier anyone have an explanation?  I would think it would have something to do with the way maple calculates the random number ... then again it could be a glitch (bug)

At first it appeared this did not exist in Maple 14, but the value got cut off after 9 zeros so it didn't show. 

So I forced to show it with evalf(b[4,4],27) and the result is surprisingly a different number not by much but different nonetheless.

Maple 12 result : 858.000000000000114

Maple 13 result : 858.000000000000114

Maple 14 result : 858.000000000000118

As I wondered earlier anyone have an explanation?  I would think it would have something to do with the way maple calculates the random number ... then again it could be a glitch (bug)

I suppose it has something to do with the way Maple is rounding floating point numbers but that doesn't explain why only one or a couple of numbers are showing values to the 10 billionth decimal place.  I'll try it on a newer version of Maple tonight and see if it's version specific. 

I suppose it has something to do with the way Maple is rounding floating point numbers but that doesn't explain why only one or a couple of numbers are showing values to the 10 billionth decimal place.  I'll try it on a newer version of Maple tonight and see if it's version specific. 

Whoops forgot the decimal after the 1000 in the rand after which you should hopefully see what I see.

So please correct it to

a:=Matrix(1..5,1..5,(rand(1..1000))/1000.):

 

 

 

 

Whoops forgot the decimal after the 1000 in the rand after which you should hopefully see what I see.

So please correct it to

a:=Matrix(1..5,1..5,(rand(1..1000))/1000.):

 

 

 

 

Sorry, I forgot I was using Maple 12 and didn't mention it.  It's probably version specific.  Thanks.

I came across a paper from the American journal of physics last night that fits nicely with this thread.

here's the pdf  .pdf

A specific example would greatly help. 

Nice job!  Cool application!

 

 

Thanks, works nicely. 

I was used to using map so I was trying to get it working using that route to no avail.

Thanks, works nicely. 

I was used to using map so I was trying to get it working using that route to no avail.

@becca 

It can be a little confusing. 

A points to the values of your Array
x points to your Array A which changes as you change the Array by your command x:=A

As pagan has shown x:=copy(A) hard codes the values of the current Array A into x so that any change in A later won't affect x unless the x:=copy(A) is re-executed.

So it is true that you have only one Array A but one refers to the current value of A x:=A and the other refers to the past value of A x:=copy(A)

@becca 

It can be a little confusing. 

A points to the values of your Array
x points to your Array A which changes as you change the Array by your command x:=A

As pagan has shown x:=copy(A) hard codes the values of the current Array A into x so that any change in A later won't affect x unless the x:=copy(A) is re-executed.

So it is true that you have only one Array A but one refers to the current value of A x:=A and the other refers to the past value of A x:=copy(A)

First 132 133 134 135 136 137 138 Last Page 134 of 162