Carl Love

Carl Love

27726 Reputation

25 Badges

12 years, 162 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@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?

But your example, in the red ellipse, does show yellow rectangles around the matching brackets. Can you show the example where it does not work?

@Markiyan Hirnyk So, as I continue to work on the original problem, I'd like to know if you intended a uniform distribution? Sorry if that wasn't clear from my last post. It doesn't really change the problem, but the average computational effort required will be different for many algorithms. I'd guess that an algorithm tailored to the logarithmic distribution would have a much better average time when the intervals were drawn from that distribution.

I'm working on a O(n~ +  h) algorithm, where n is the number of intervals and h is the number of pairs of intervals that "hook" together.

First 659 660 661 662 663 664 665 Last Page 661 of 704