Christopher2222

5790 Reputation

24 Badges

15 years, 313 days

MaplePrimes Activity


These are replies submitted by Christopher2222

Thanks Acer, mmacdara and Sand15 for your inputs.  Much appreciated.

mmacdara, I did see another post of yours with 2 dice - lengthy haven't gone through it yet.  I appreciate all the replies. 

To put things into perspective, cat out of the bag so to speak.  It all spurred from my son who wanted to randomly pick a 5 player team from the 120 common hockey cards from this years Tim Hortons Hockey card collection.  He only has a 6 sided dice, and he's memorized which player belongs to which number so randomly had to be done.  And had to do it simply enough for him - eneded up teaching him about modular numbers which he gets but it's many years ahead of his math level. 

@acer Thanks  This is good.

I also thought about dividing the 20 up a few times.  roll of 1-3 would select values 1 to 10 and 4-6 select 11 to 20. Then roll again to split that up 1-3 for 1-5 and 4-6 for 6-10 etc.

Then I was left with choosing 5 numbers with a 6 sided die.  Just to continue on this track for a minute, I would have a loop that would just roll again if a 6 came up - I thought that was the simplest way to settle that thought.  But I got stuck trying to develop a while loop that would work.  Got stuck with the recursive assignment.  Any suggestions for that type of loop?

@mmcdara Thanks for the inputs. 

[moderator: moved description of the OP's actual goal to the body of the original Question.]

@sand15 Interesting thanks.  I came up with something similar but it seems my way doesn't result in a uniform distribution. 

So picking a range from 1 to 20 using a six sided die I came up with this

with(Statistics):
d1 := RandomVariable(DiscreteUniform(1, 6)):

# for 500 samples of 4 rolls added
a := [seq((round(add(Sample(d1, 4))) mod 20) + 1, i = 1 .. 500)]

Histogram(a)

Distribution isn't fair.  Maybe your idea is better?

@Thomas Richard yeah, only values divisible by 3 are showing up. 
That is the sum of N rands only outputs solutions divisible by N.

Basically I was trying to use a 6 sided die to come up with a random number from a set range using mod.  Was looking at the distribution when I came across the rand issue.  Concluding me to look for another option.

Great post Daniel Skoog.  One thing though, your Lissajous knot is actually an unknot.  Using cos(7*t) produces a curve that can be unwound without knotting.  I believe you mean to use cos(5*t) which can not be unwound without knotting.

 

@Traruh Synred The help states Multi-line comments are not available in 2-D math

It seemed to have worked in my 2d math, which is the default setting in document mode.  You perhaps are using the wrong brackets or missing a bracket during your construction of the comment section.

 

@segfault I have submitted a software change request. 

Maplesoft can't keep everyone happy all the time, but I think every little bit counts.  This change request should be a relatively easy one to incorporate.  In fact there may be some java trickery that could be done in an ini file or something that someone may be able to macguyver. 

@segfault I don't think they're resisting the change.  I think they just haven't allocated resources to make that change and instead have focused more on improving Maple performance.  Yes it would be a nice feature but aesthetics is probably low on their priority list. 

I'm not very familiar with Linux so I thought the Jupyter theme package would work for you.  In Linux there must be a setting to change the desktop colors.

In windows under the advanced personal settings the canvas can be changed but it occurs for all applications.  I show you below what Maple looks like when I make that change under windows 7, and also see that the notepad application canvas has also changed. 

 

For Linux (which it appears you are using) you can download the Jupyter - themes package and that will control the background color.

Same with Windows, will have to adjust the themes colors in the operating system.

But other than using the tables work around to change the color there doesn't appear to be another way. 

@sursumCorda Do you mind if you repost or reshare your alternate way?  I think it had to do with a vector approach. 

There was a posted comment by "sursumCorda" that was deleted.  Who and why was it deleted???  Mapleprimes please re-instate the deleted answer.

@C_R it's faster since you have more cores and logical processors. 

@Preben Alsholm oh thanks for that.

So for older versions of Maple using that method we'd need the map and would have to do

d[..,1]:=map(floor,d[..,1])

Thanks!

@Joe Riel Great!  Yeah, the delay is a bit long.

Also the advanced search will not list replies.  As I noticed, and just found out, the drop down box for type only includes posts and questions but not replies, so it won't be an "all time" list unfortunately.  But luckily that can be found under the tab. 

The only other thing missing is replies of type "comments" there is no tab, and no dropdown type for that.  So if you're looking for a comment reply from a post, unless you know some keywords that normal search will pickup it won't be easy trying to find it. 

****edit update**** Actually, doing more checking and the comment replies entries will be brought up under the replies tab.  My only disappointment still being under the advanced search type - replies option isn't available *************

1 2 3 4 5 6 7 Last Page 3 of 155