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 replies submitted by erik10

Wow! Thanks to all of you. I didn't know about the draw command. I guess Maple simply has many tools to accomplish the same thing. But also sometimes Maple is so big it is hard to know about every smart command to do the job ... It requires more overview pages, but maybe Maple already have that?

NB! Still puzzled though, that this polyhedron is not supported by the polyhedraplot command. The support list contain a long list with more or less obscure polyhedra, but maybe there is a reason ...

Erik

@Carl Love 

Great! I will test it.

Erik

@Carl Love 

Thanks Carl. I appreciate it. No it is not too simple! It can be used for automation purposes.

Now, I notice in the Help pages, that it is possible to manually make set operations using union, intersect, minus and subset. One can even use the ordinary symbols like ∩ as operators, which is great. It would be nice with a complement operator as well. The reason why it is not implementet is probably that it need knowledge about the Sample Space U. I usually use a 'c' written as a superscript to refer to the complement of an event.

   

Defining the complement of a set using a superscript obviously fails, because putting 'c' as a power to a set is meaningless. Also it fails using a Not operator below. Using a literal index works, and it is acceptable. Maybe I should emphasize that I want the notation to be as close as possible to ordinary math notation, for the sake of my students. I don't want them to bother too much with complex syntax. My question is now: Is it possible to make a definition in some way, so that whenever I write X with a literal index (and the set X and U defined beforehand), Maple will understand that I mean the compelement of X? If this is possible I will not have define the complement for every set or event I use ...

Erik

 

@Carl Love 

Since the manual thing above worked so well, I have an additional question: Sometimes I would be interested in having Maple handling sets for me and calculating probabilities. Let's say I am throwing two dice, a green and a red one.

Given two events, H and G. I would be interested in having Maple calculate the union and intersection of H and G as well as their probabilities P(H∩G) as well as P(HUG). How is this done conveniently? What about the complement of a set?

Erik

 

 

 

 

 

@Carl Love 

Thanks Carl! And I see I am allowed to use set operators as well!

Erik

@Carl Love Thanks Carl. I didn't mean it exactly that way, but I can use your ideas for other purposes. I m actually quite satisfied with how I have got now.

Erik

@Kitonum Thank you! Nice zip-function to combine the two lists into one and then manipulate this using a map command. I guess this is the most straightforward way to do it without having to use procedures, right? I did rewrite it a bit for my own situation to make it s bit more readable, though:

restart;
with(Gym);
R := [163, 163, 163, 107, 107, 107, 51];
V := [15, 45, 75, 15, 45, 75, 45];
W := zip((x, y) -> [x, y], R, V);
X := map(t -> t[1]*Cos(t[2]), W);
Y := map(t -> t[1]*Sin(t[2]), W);

NB! That way I can easily access X and Y. I have used a custom package to deal with cosine and sine when angles given in degrees.

Regards,

Erik

 

@Carl Love 

Yes something like that, but the name quotes behaves in a very strange way in my opinion. I was not able to mix it with the rest of the line - to get what is inside the red rectangle. Apparently Maple can't make an output like in a typical programming language, where you can mix text and symbols with values of variables... Anyway, I am pretty happy I got the right side.

@Markiyan Hirnyk 

Not entirely satisfying. How do I write something without having it interpreted in the same line? Quotes around it doesn't work ...

Erik

Great! I like the latter way. Then the part on the right side of the equality sign is fixed. How do I write f0 ' in front of it, without having Maple evaluate it as d/dxf0(x) ? (Probably basic again, sorry)

Thanks,

Erik

Great! Thanks to both of you.

Regards,

Erik

@Carl Love Thank you for the reminder. Maybe it is a bug that the cursor doesn't stop at the line, where the error occurs - as it did in Maple 16, you say?

Interesting with the Modules. I haven't been working with modules earlier. I understand it as a kind of collection of procedures created for a special purpose, so it makes a whole and easier to work with.

Erik

@Carl Love Thank you for the reminder. Maybe it is a bug that the cursor doesn't stop at the line, where the error occurs - as it did in Maple 16, you say?

Interesting with the Modules. I haven't been working with modules earlier. I understand it as a kind of collection of procedures created for a special purpose, so it makes a whole and easier to work with.

Erik

Thanks a lot, Carl. I will look at it soon. So far I have been looking at other corners of my program ...

Thanks a lot, Carl. I will look at it soon. So far I have been looking at other corners of my program ...

5 6 7 8 9 10 11 Last Page 7 of 17