701 Reputation

14 years, 343 days

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.

Creating single random values from a dis...

Maple

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

How to export data to Excel file into co...

Maple

Dear Maple users

I wanted to export two long lists X and Y of data into two columns in Excel by using the Export command from the ExcelTools package. Data was however exported into rows! I converted the lists into vectors and I succeeded in doing it the way I wanted:

with(ExcelTools);
X1 := convert(X, Vector);
Y1 := convert(Y, Vector);
Export(X1, "data1.xlsx", 1, "A1");
Export(Y1, "data1.xlsx", 1, "B1");

But is it really necessary to convert to vectors in order to accomplish this task?

Regards,

Erik

Severe basic bug in Maple 2019.1 in Docu...

Maple 2019

Dear Maple users

Some students have come to us to report, that something doesn't seem to work properly in Maple 2019.1 in Document Mode. And they seem to be right: writing an passive math formula by using Shift+F5 (the formula is gray, not blue), then using F5 to get out of that Math field and back into Text Mode. Using the Enter key to go to the next line: It doesn't work! The cursor stays in the same line. This behavior is new in Maple 2019. It worked properly in Maple 2018 and earlier. I assume it is not the intention?

I know it can easily be dealt with by making a new Paragraph by using the shortcut Ctrl+Shift+J. I call the assumed bug 'severe' though, because it will severely delay the workflow for many students. They are used to deliver a document mixed with formulas (active or passive) and text.

NB! I have tested it on several computers (Mac and Windows), and it doesn't work on any of them.

Regards,

Erik V.

Mac OS Catalina - 64 bit...

Dear Maple users

I am just curious about how far Maplesoft is updating the Mac version of Maple to 64 bit (Catalina). This version of the Mac OS will hit the shelves in late September this year. As I have been told, no program built on 32 bit will be able to run on this new version of Mac OS. I am pretty sure there will be a lot of software troubles for students upgrading to this version. We can recommend the students not to upgrade immediately, but it would be interesting to hear how far Maplesoft is creating a 64 bit Maple-installer for Mac?

Regards,

Erik V.

Operations on matrices...

Maple

Dear Maple users

I have a question about performing operations on a matrix and another one about retrieving information from a matrix. I am looking for the easiest (hopefully also the shortest) way to do it:

1. Given a matrix with several rows and columns. I want to permute the rows in such a way that the entries in a specific column are ordered (either ascending or decending as wished).

2. Given a matrix with several rows and columns. I want to count how many entries in a specific column are above a certain given fixed value.

I am pretty sure some of you guys out there can do it in an elegant way. Examples will be appreciated.

Regards,

Erik

 1 2 3 4 5 6 7 Last Page 3 of 15
﻿