erik10

I have a degree in Mathematics and Physics from the Danish University Aarhus, comparable to a masters degree with thesis - majoring in Mathematics. In 1991-92 I was a visting scholar at UCLA, Los Angeles, following graduate courses in Applied Mathematics. Since 1992 I have been a teacher in a high school (gymnasium) in Denmark. Special interests: Applied mathematics, graphics and popularizing Mathematics.

MaplePrimes Activity


These are questions asked by erik10

Dear people at Mapleprimes

My situation is the following: I have a number of bins (n bins), which all contain a specific number. I want to choose at random from these bins a number of times (N times), but in such a way that it is not equal likely that I choose from bin1, bin2 ...

Example: I have 5 bins: The 5 bins contains the numbers 50, 60, 70, 80, 90 respectively. The probabilities of choosing from these 5 bins should be 0.10, 0.30, 0.20, 0.25, 0.15 respectively. I make N = 100 selections. The output is expected to be a list with 100 numbers, for example: [ 50, 80, 80, 60, 60, 90, 50, ... , 70]. 

I could make it work myself by picking a random number from the uniform distribution from 0 to 1 and deciding if the a random number is between 0 and 0.10, between 0.10 and 0.40, between 0.40 and 0.60, etc. and then choosing the number in the corresponding bin ... I just wonder if Maple has an elegant way to to it? 

Regards,

Erik

 

Dear Maple users

I have had problems with Maple 2020. I am using Windows 10, by the way, and have several versions of Maple installed: 2019, 2018 and even 2017. Now however I am unable to open a Maple file from Windows Explorer either by double-clicking or by right-clicking and choosing "Open with" Maple 2020. Nothing happens when I try so! It works properly when I choose older versions of Maple. I have about the same problems on another computer, an Ultrabook. It is really a pain having to open Maple 2020 and then having to browse all the way down a file path ... 

NB! I have tried reinstalling, but it didn't help!

I hope someone have an idea how to solve this issue. Can it be solved in the Windows Registry?

Regards,

Erik

Dear Maple users

I just created a sunflower in Maple using the Golden angle. See attached file. I am using a scatterplot with solidcircles as symbols. But what I would like now is to plot integers instead of the solidcircles in order to investigate the order of these different solidcircles. To make it clear: I have 500 solidcircles. They have been plottet using two vectors containing the x and y coordinates of the individual solidcircles. The n'th solidcircle I want to replace with the integer n. How can I create that different plot?

NB! The plot might need to be larger or the integers smaller, but that is fine. 

 

Regards

Erik V

sunflower.mw

Dear Maple users

I have been looking in the Maple help menu for categorical plots or charts, and haven't been able to find an appropriate one. I hope someone can help me. I am looking for something like the following, which I have been drawing:

Regards,

Erik V.

Dear Maple users

I wanted to create a list of random datapoints for the "simple linear regression model". Standard deviation sigma is given, slope a and fixed value b given for the line as well. Before the code below I had some random x-values created for the data points saved in the list X. To calculate the corresponding y-values randomly from a normal distribution with standard deviation sigma and mean equal to a*x+b I wrote the code below:

 

randomize():
for i from 1 by 1 to N do    
    mean:=a*X[i]+b:
    Yvar:=RandomVariable(Normal(mean,sigma));
    S:=Sample(Yvar,1);
    Z[i]:=S[1];
end do:
Y:=convert(Z,list):

....

 

It actually works, but I just found it a bit strange having to repeatedly ask for a random sample with only a single member. Isn't it possible to do it more efficiently? I am aware of the special properties of the normal distribution, which would make it possible to take only one sample and add the mean afterwards, but I am not looking for ad hoc solutions, rather appropriate commands to create simgle random values from a distribution.  

Erik

 

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