Carl Love

Carl Love

27172 Reputation

25 Badges

11 years, 337 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Markiyan Hirnyk You must've inadvertently hit backspace while your cursor was in the Code Edit Region. The main procedure in the module needs to be named ModuleApply. In the code in your most recent attempt it appears as ModleApply. The original version of the attached worksheet is fine, but here I have attached a new version with some more comments.

Subcover1.mw

@Markiyan Hirnyk You did not load the module, so it just returned an unevaluated function call. You have to place your cursor in the Code Edit Region, right click, and select Execute Code (or simply left click in the Code Edit Region and press Control-E).

Also, the procedure expects a set or list of open intervals as the first argument, the way you had it in your original posing of the problem. In your attempt above, you are passing a list of closed intervals. You'll just get an uninformative error if you pass spurious arguments. It is only meant to handle the question under consideration.

I think the code is well commented already, but I suppose that I could add a few more. Is there some part of it in particular that you would like explained? Did you read the comments that are already there?

@Markiyan Hirnyk You did not load the module, so it just returned an unevaluated function call. You have to place your cursor in the Code Edit Region, right click, and select Execute Code (or simply left click in the Code Edit Region and press Control-E).

Also, the procedure expects a set or list of open intervals as the first argument, the way you had it in your original posing of the problem. In your attempt above, you are passing a list of closed intervals. You'll just get an uninformative error if you pass spurious arguments. It is only meant to handle the question under consideration.

I think the code is well commented already, but I suppose that I could add a few more. Is there some part of it in particular that you would like explained? Did you read the comments that are already there?

@Markiyan Hirnyk 

It looks like you were trying to cut-and-paste the long section of code. I recommend that you simply download the attached worksheet and use the code in that. Put your cursor in the Code Edit Region, right click, and select Execiute Code. That will load the module, and then you can enter test code below at the red prompts.

If you cut-and-paste, only use the code up to the line of dashes. The line that appears to be starting a new module shouldn't be there. That's a bug in the MaplePrimes editor that is manifested when one uploads a worksheet containing a Code Edit Region.

Thank you for your interest in the code. Please let me know if you continue to have trouble.

@Markiyan Hirnyk 

It looks like you were trying to cut-and-paste the long section of code. I recommend that you simply download the attached worksheet and use the code in that. Put your cursor in the Code Edit Region, right click, and select Execiute Code. That will load the module, and then you can enter test code below at the red prompts.

If you cut-and-paste, only use the code up to the line of dashes. The line that appears to be starting a new module shouldn't be there. That's a bug in the MaplePrimes editor that is manifested when one uploads a worksheet containing a Code Edit Region.

Thank you for your interest in the code. Please let me know if you continue to have trouble.

Please upload your worksheet.  Your code above cannot be an exact transcription of what you typed into Maple because it contains a "double equation" x=0..1 = sigma_t. Maple would've definitely responded to that with an error message.

You also need to use the Shrink (S) command (which changes the step length for the Forward command) and the Stack commands Push (v) and Pop (^). If you Push at every branch point, a Pop brings you back to the branch point, and then you don't need to ever go Backward or to Grow. Of course, you need to use recursion. I think that the recursive step should begin with "vS" (Push, Shrink) and end with "^" (Pop).

By the way, what is the title of the course that you are taking? It seems like a good course. Is the primary subject matter in these problems recursion or fractals? I would guess recursion. And, is this at Stony Brook?

Good answer. I often forget about the Student super-package. The Roots command as you presented it finds the exact roots, which is quite easy in this case. There is also the numeric option,

Roots(eq, x= -5..5, numeric);

which handles the more general case.

Good answer. I often forget about the Student super-package. The Roots command as you presented it finds the exact roots, which is quite easy in this case. There is also the numeric option,

Roots(eq, x= -5..5, numeric);

which handles the more general case.

@acer There is a serious need for a single stock (library) command that will find all the real numeric roots in a interval (that can be found), without using a loop. There is the DirectSearch package. Are there any serious limitations Student:-Calculus1:-Roots (from Georgios's Answer) with the numeric option? Should it be "graduated" out of Student to the main library or to RootFinding? Note that it calls `minimize/fsolve`, which calls fsolve in a recursive loop. But it is more sophicated than just adding each found solution to an avoid set. That method only finds 11 of the 25 roots for the problem at hand.

@acer There is a serious need for a single stock (library) command that will find all the real numeric roots in a interval (that can be found), without using a loop. There is the DirectSearch package. Are there any serious limitations Student:-Calculus1:-Roots (from Georgios's Answer) with the numeric option? Should it be "graduated" out of Student to the main library or to RootFinding? Note that it calls `minimize/fsolve`, which calls fsolve in a recursive loop. But it is more sophicated than just adding each found solution to an avoid set. That method only finds 11 of the 25 roots for the problem at hand.

@kswong89 Pick another (simple) symbol for sqrt(-1). Let's say that I choose _I. Then do

interface(imaginaryunit= _I):

@kswong89 Pick another (simple) symbol for sqrt(-1). Let's say that I choose _I. Then do

interface(imaginaryunit= _I):

There was no file attached to your post.

I couldn't read the screen, but I linked to the GIF file. That problem/bug looks very weird. It looks like the Matrix returned by MatrixAdd has memory overlapping with another Matrix. Could you upload the entire worksheet so that we can investigate further?

Also, what do you get from the simple M+K?

First 652 653 654 655 656 657 658 Last Page 654 of 697