PatrickT

Dr. Patrick T

2153 Reputation

18 Badges

16 years, 96 days

MaplePrimes Activity


These are replies submitted by PatrickT

Dear Preben and others interested in catching, the following works:

catch:StringTools[FormatMessage]("probably a singularity"):

P.S. Only did preliminary tests, wanted to write back asap, if further problems arise I will write again.

Thanks again Preben!

Dear Preben,

thanks very much, this is very helpful, I think the "catch" syntax is potentially very helpful here. There are some problems, however.

I typically get two kinds of warnings, which I copy-paste here:

Warning, cannot evaluate the solution further left of -51.083788, event #4 triggered a halt
Warning, cannot evaluate the solution further left of -.33185190e-2, probably a singularity

The first warning is triggered by "events" I have set up and is very much part of the simulation. It is a warning I can safely ignore. The second warning is triggered by the existence of a singularity in the vicinity of the initial conditions I select --- this is the warning I want to "catch". Thus, I would like the procedure to distinguish the second kind of warning from the first. I thought about doing this:

catch "probably a singularity":

Unfortunately, it does not work. I welcome any suggestions!

It's difficult to guess from the help files whether it's supposed to work. I would have thought yes. The help files have only one example, namely catch "FAIL": Strangely, catch "Error": or catch "Error," two keywords present in your example, do not work either.

Quoting from the help files (title: Exception Handling - the try Statement): "The exception object that corresponds to the exception is compared against each catchString in turn until a match is found." This sounds like what I tried ought to work, but I am no grammarian.

Later in the same help file, it states "If a catchString has n characters, only the first n characters of the msgString have to match the catchString. This allows one to define classes of exceptions." But no-where does it give a value for n...


The "catch" statement works as expected in the following:

catch "cannot evaluate the solution further right":
catch "cannot evaluate the solution":
catch "cannot evaluate":
catch "cannot":

The "catch" statement does not work in the following:

catch "evaluate the solution":
catch "evaluate":
catch "solution":
catch "further right":
catch "further":
catch "right":
catch "probably a singularity":

Dear Preben,

thanks very much, this is very helpful, I think the "catch" syntax is potentially very helpful here. There are some problems, however.

I typically get two kinds of warnings, which I copy-paste here:

Warning, cannot evaluate the solution further left of -51.083788, event #4 triggered a halt
Warning, cannot evaluate the solution further left of -.33185190e-2, probably a singularity

The first warning is triggered by "events" I have set up and is very much part of the simulation. It is a warning I can safely ignore. The second warning is triggered by the existence of a singularity in the vicinity of the initial conditions I select --- this is the warning I want to "catch". Thus, I would like the procedure to distinguish the second kind of warning from the first. I thought about doing this:

catch "probably a singularity":

Unfortunately, it does not work. I welcome any suggestions!

It's difficult to guess from the help files whether it's supposed to work. I would have thought yes. The help files have only one example, namely catch "FAIL": Strangely, catch "Error": or catch "Error," two keywords present in your example, do not work either.

Quoting from the help files (title: Exception Handling - the try Statement): "The exception object that corresponds to the exception is compared against each catchString in turn until a match is found." This sounds like what I tried ought to work, but I am no grammarian.

Later in the same help file, it states "If a catchString has n characters, only the first n characters of the msgString have to match the catchString. This allows one to define classes of exceptions." But no-where does it give a value for n...


The "catch" statement works as expected in the following:

catch "cannot evaluate the solution further right":
catch "cannot evaluate the solution":
catch "cannot evaluate":
catch "cannot":

The "catch" statement does not work in the following:

catch "evaluate the solution":
catch "evaluate":
catch "solution":
catch "further right":
catch "further":
catch "right":
catch "probably a singularity":

This is a great exchange, love it. May 2012, still not possible to upvote comments, nearly two years on...

you might be able to combine a plot of the trajectories obtained with plots[odeplot] together with the phase diagram obained with DEtools[DEplot], by first defining them, e.g. phase:=DEtools[DEplot](), trajectories:=plots[odeplot]() and then combining them with plots:-display(phase,trajectories);

I agree with acer, Valery, it is not clear at all what your posts are about. It would be a lot more useful and a lot less distracting if you would clarify the topics addressed in your posts by thinking a little more about your titles. Thanks.

Thanks, I guess you mean this program: http://meshlab.sourceforge.net/

I'll be looking into it when I get a chance.

Thanks, I guess you mean this program: http://meshlab.sourceforge.net/

I'll be looking into it when I get a chance.

you posted the same message twice, so I deleted one of them.

If you have properly done your animation, you can export it as gif and it will be animated. And if you haven't done it properly we don't know because you haven't posted any code of what you've done.

Within Maple if you want to see the animation, you need to select "play" and you probably want also the option "continuous". You can right-click on the image for that.

@Alejandro Jakubi 

could be a way to monitor how many requests they get, to see how many use the postscript export function? or it could be that the patch is not perfect and in ongoing development. We're still on Maple 15 here...

Alejandro, here is the faq, you have to know where it is to find it:

http://www.maplesoft.com/support/faqs/detail.aspx?sid=133099&pid=1

I have the same experience, I'm curious to know if there's a fix, it's particularly tedious to remove the extra > when you copy-paste several paragraphs of code...

it doesn't sound very good, you may be right, it's probably a more general problem with your graphics hardware. I'd strongly recommend backing up everything ;-)  I use clonezilla, it's excellent.

it doesn't sound very good, you may be right, it's probably a more general problem with your graphics hardware. I'd strongly recommend backing up everything ;-)  I use clonezilla, it's excellent.

more likely you are feeding a list of list or set of set or something like that, it would be useful if you showed us the code that has problems. Does this code works outside of a procedure but not inside? that would be surprising, to me.

First 17 18 19 20 21 22 23 Last Page 19 of 93