Carl Love

Carl Love

28070 Reputation

25 Badges

13 years, 26 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

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

Note that the default for RandomTools:-Generate(float(range= a..b)) is a logarithmic distribution. If one of the endpoints is 0, then there is an extreme bias towards values close to 0. I don't think that that is what you intended. You can override the default thus: RandomTools:-Generate(float(range= a..b, method= uniform)). See ?RandomTools,flavor,float.

@kswong89 The minus sign in front is because 1/I = -I, assuming that by I you meant sqrt(-1), which is the default in Maple. If you just meant for I to be a variable, then we need to change that default, which is not difficult to do.

First 664 665 666 667 668 669 670 Last Page 666 of 709