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

@acer Thanks, that settles it all, I think. Thank you for your effort to help me.

Erik

@acer Maybe I understand now: It has to do with the order in which things is being evaluated? All this is due to the presence of the linearInterpolation, I presume.

Now I have finished my task, which is to plot the entire P-wave trajectory. I also allow the angle for the bottom of the curve to be other value than 0, naming it theta_0. I made a mirror plot and put it all together in the attached file. 

One strange thing, though: If I alter r_0 from 5338 to 5330 or less, the calculations takes a lot of time. Maybe due to there being a singularity in the integral around that value ...

Seismology_acc_ev_ac_ev.mw

@acer OK, thank you for the explanations. Now, I also wanted to convert the polar coordinates to rectangular coordinates: See my attached document. Unfortunately my simple approach does not work. It is probably because I don't really understand how the data is represented in Maple due to the Interpolated function being present. My goal is to plot this vector function in 2D along with a circle of radius R = 6338 (using the display command). I will however also have to mirror the curve, because I only get half the propagation path for the P-waves using the integral ...

Seismology_acc_ev.mw

@acer 

Great! I tested both of your methods and they both took about 20 seconds to execute on my computer. Although I don't get the integral displayed in 2D notation in the worksheet, I think I prefer your last acc method. This is mainly because I am able to insert values for the radius into the Theta-function in order to receive angles for specific values of radius. This doesn't happen in the ac method, where I just receive an abstract expression.

A couple of questions:

What does the adaptive=false option in the plot command mean?

Did you choose numpoints=41 by trial and error?

You are doing a great job here at Mapleprimes indeed! The solution to my questions wasn't as easy as expected, and I don't think I could have figured it out myself, even if struggling more.

Erik

Hi Acer and thanks for your valuable answer. My underlying problem was however even more complicated. Maybe your additions will help solve it even then. It is about Seismology, where I have data for the velocity of P-waves for certain steps of radius r. Then I wanted to use linear interpolation (or spline maybe even better) to construct a function v_lin(r) for alle values of r. This function has to be put into an integral with other expressions in order to construct the solution of the wave propagation of a P-wave through the Earth: Angle as a function of radius r (polar coordinates of path). This means I get another level of complication, because now the limit of the integral is becoming the variable. I attach the file. I guess you will grasp my idea rather quickly. But how do I make Maple calculate this integral, which is in reality a new function? ...

Seismology.mw

Yes, that one is indeed even nicer. Easier to grasp when viewing the code. Thanks!

Erik

Wow is it that simple. Thanks! So I was on the right track. I guess that this is the most convenient way to do it then - with assigments put into an if condition. 

Erik

@jganding 

Your way is maybe the most proper way to do it (not using workarounds), although it is a bit lengthy. Sometimes one just needs to have the x-axis drawn at the right place in order not to get fooled by false zeros, when the x-axis is displayed at a certain constant non-zero y-value. Maplesoft should provide a more decent way to make this happen. In the current situation the user is supposed to choose a function by himself, so I need to have Maple display the graphs automatically in a way, which includes the x-axis. 

Again thank you to all of you for your contributions. 

@Preben Alsholm 

Thanks to you and Rouben.

Rouben: It works, but not especially pleasing to have to create a "fake" invisible point and then use display to glue those plots together.

Preben: Your suggestion is more simple and the additional plot on the x-axis is barely noticeable. 

I will use one of those if nothing else works. I guess there is no other way to access the y_min and y_max which Maple is using when plotting a function - before actually plotting? Some kind of range command ...

Also I wish it was possible to make a y-range halfway default by being able to write something like y=0..default. Or eventually make an option possible for inclusion of certain values. It could be a wish for Maple 2025 ;)

Thank you for your suggestions. 

Erik

Thanks a lot. Looks like it is what I am looking for!

Regards,

Erik V.

Thanks to all of you. I like the single line function definition, which is simple and seems to work. It also seems to work for special French and German letters: 

LEN("éâü") = 3

Regards,

Erik V.

@TechnicalSupport  Thanks for looking into this. I am asking on behalf of another Colleague. We will try your suggestions to restart and creating new documents. If it still happens will it eventually help to completely uninstall Maple with all its components in order to install Maple again from scratch? We are puzzled about the origin of this issue. We have only noticed it once. Since the student is going for exams later this spring, she need to have Maple working properly - hopefully not necessary to rent another computer ...

Erik

Thanks to all of you. I see, that adding a semi colon does indeed make it work, or right-clicking and choosing Convert > 1D Math input, as mentioned by Preben. I do however need to have it fixed for the student. It is not just one document, but all documents she is creating. 

The student as well as myself are using Windows 10, and we both have the latest version of Maple, Maple2022.2. We are using Document Mode, and that won't change. Our school has been using Maple with success for 14 years until now! 

When I open this Error file in Maple and right away create a new document, apply a square root from the Expression Palette, I also receive an error. That is really crazy in my view. A bad file is opened and it 'transmits it its infection' to every new document I may create!! But only when the bad file is opened. I don't get it. Maybe I should ask Maple support ...

Erik

@Rouben Rostamian  Thanks a lot! I appreciate your work!

Erik

@Rouben Rostamian  Great! Just as I wanted it. I don't know about Python, but I assume you are calling the Python Package to be able to do something more simple, than would be the case in Maple itself, right?

I might later want a procedure, which can turn every letter in a Matrix into Capital letters as well as a procedure turning every letter in a Matrix into lowercase letters. Is that easy to do in Python? (And stay with symbols in order to avoid quotes)

Erik  

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