pagan

5147 Reputation

23 Badges

17 years, 122 days

 

 

"A map that tried to pin down a sheep trail was just credible,

 but it was an optimistic map that tried to fix a the path made by the wind,

 or a path made across the grass by the shadow of flying birds."

                                                                 - _A Walk through H_, Peter Greenaway

 

MaplePrimes Activity


These are replies submitted by pagan

How about modifying that to be

dualaxisplot(a1,plottools:-scale(a2,1,10));

How about modifying that to be

dualaxisplot(a1,plottools:-scale(a2,1,10));

In the first 5 years of Mapleprimes, everybody could post blogs items; all members had a "blog" which was a distinct section off their profile page. In the second version of Mapleprimes (April, 2010 or so) only Maplesoft employees have Blogs per se, in the Maplesoft Blog (which used to be separate from Mapleprimes but was then merged in).

There were many truly great blog posts by Alec Mihailovs, Joe Riel, Jacques Carette, etc, in the first years. In the transition to Mapleprimes V.2 all such blog items were turned into mere Posts. (Google's taken a while to `forget' that, btw.) Such posts used to be easily found and searched for, due to that previous classification.

A relative minority of the new Maplesoft Blog items have been high quality technical content (and includes those of Darin, Samir, Robert, & John). Many of the rest are general and often non-technical discussions which coincidentally mention hot topics like multi-domain modeling and Maple/MapleSim in the same paragraphs. The first years of the Maplesoft blog saw almost entirely such marketing posts, and the more technical content has mostly come later.

A few regular Mapleprimes members have tagged their blog-like posts with a "blog" tag. So anyone can just click that link. It would be great if more of the "original" regular member's blog items were given that tag retroactively. (There's a very small amount of noise in that blog-tag link, comprised of posts like this very one here, which discuss that same topic and include it as a keyword. But the noise is negligible.) The whole point is for anyone to be able to find the best old material, collated somehow.

There's a lot of amazing material on this site, and tags are about the only decent way to get at it (Search is much more hit and miss). The transition to Mapleprimes V.2 incorportated an automatic tagging of old items according to keywords. That automatic process worked okay, but not very well. One of the big points of tags is that posts can get relevant classication tags even when such a keyword does not appear explicitly in the text body. So getting the best tags takes more judgement on some person's part. Tags have great potential, but they are underused here.

You could do that too; make a Post, and give it that blog tag.

In Maple (13 or 14, preferably)

Explore(plots:-pointplot([seq([M,evalf(Sum((-1)^n*(n^(1/n)-u),n=1..M))],M=1..m)]));

When the pop-up window appears, mark capital `M` as skip. Set the upper range for `m` to something like the exact integer 100. Set the upper range for u to the float 2.0 and leave everything else as is.

Then click the "Explore" button on the pop-up.

If Maple asks in another "Select Math Engine" pop-up, choose a New kernel connection.

A new Document should appear. This should be able to run in new sessions, on its own, without the parent sheet from which you called the Explore(...) command.

You can insert a style=line option into that pointplot call, if you want to make it look even more like the cited Mma demo.

Download mrb_explore.mw

@maple You've made it clear, with all your duplicate questioning, that you want to export to .eps a color version of plots with the full variety of labels that 2D Math typesetting offers.

That cannot currently be done using the Classic GUI.

It is easy to do with the Standard GUI.

The problem is not that we do not understand your question. The problem is that you are not hearing the answer.

@maple You've made it clear, with all your duplicate questioning, that you want to export to .eps a color version of plots with the full variety of labels that 2D Math typesetting offers.

That cannot currently be done using the Classic GUI.

It is easy to do with the Standard GUI.

The problem is not that we do not understand your question. The problem is that you are not hearing the answer.

@dalmas64 I wrote that with() does not work in a loop. But I did not write that Maximize doesn't work inside a loop.

Maximize works inside a loop, if with(Optimization) is done properly outside the loop. You can call Maximize inside a loop, using different coefficients, etc, with each iteration.

It's just the call with(Optimization) that will not work (as you intended) inside a loop. That's simply due to how Maple's package loading mechanism works internally. It's got to do with how `with` works. It's nothing to do with Optimization in particular. But that doesn't matter because you can load the package once outside the loop, and then use Maxmize many times within the loop.

Here is a working example:

> restart:
> with(Optimization):

> for i from 2 to 5 do
>   Maximize( exp(x)-(x*i+0.1)^2, x=-1..1);
> end do;

                [1.01582256439596, [x = 0.0862614062155275]]
                [0.994708068587837, [x = 0.0235458437834959]]
               [0.990645206125867, [x = 0.00645228552335139]]
             [                   [                        -11]]
             [0.990000000000000, [x = -5.67906704573796 10   ]]

You don't necessarily have to load a package, using `with`, in order to use its commands. That is because you can instead use the long form of the name of the command from the package. Here's an example:

> restart:

> for i from 2 to 5 do
>   Optimization:-Maximize( exp(x)-(x*i+0.1)^2, x=-1..1);
> end do;

                [1.01582256439596, [x = 0.0862614062155275]]
                [0.994708068587837, [x = 0.0235458437834959]]
               [0.990645206125867, [x = 0.00645228552335139]]
             [                   [                        -11]]
             [0.990000000000000, [x = -5.67906704573796 10   ]]

You might want to also read the ?with help page, just in case you also get into difficulties trying to invoke `with` from within a procedure or statement.

@dalmas64 I wrote that with() does not work in a loop. But I did not write that Maximize doesn't work inside a loop.

Maximize works inside a loop, if with(Optimization) is done properly outside the loop. You can call Maximize inside a loop, using different coefficients, etc, with each iteration.

It's just the call with(Optimization) that will not work (as you intended) inside a loop. That's simply due to how Maple's package loading mechanism works internally. It's got to do with how `with` works. It's nothing to do with Optimization in particular. But that doesn't matter because you can load the package once outside the loop, and then use Maxmize many times within the loop.

Here is a working example:

> restart:
> with(Optimization):

> for i from 2 to 5 do
>   Maximize( exp(x)-(x*i+0.1)^2, x=-1..1);
> end do;

                [1.01582256439596, [x = 0.0862614062155275]]
                [0.994708068587837, [x = 0.0235458437834959]]
               [0.990645206125867, [x = 0.00645228552335139]]
             [                   [                        -11]]
             [0.990000000000000, [x = -5.67906704573796 10   ]]

You don't necessarily have to load a package, using `with`, in order to use its commands. That is because you can instead use the long form of the name of the command from the package. Here's an example:

> restart:

> for i from 2 to 5 do
>   Optimization:-Maximize( exp(x)-(x*i+0.1)^2, x=-1..1);
> end do;

                [1.01582256439596, [x = 0.0862614062155275]]
                [0.994708068587837, [x = 0.0235458437834959]]
               [0.990645206125867, [x = 0.00645228552335139]]
             [                   [                        -11]]
             [0.990000000000000, [x = -5.67906704573796 10   ]]

You might want to also read the ?with help page, just in case you also get into difficulties trying to invoke `with` from within a procedure or statement.

This worked fine for me, in a single execution block in a Worksheet.

There's no point in loading a package inside a loop, since you only need it done once. (And Maple doesn't do the rebinding of names of the package exports until the loop executes, but the body of the for-loop is determined before that occurs while the command name is still global in this context. This is subtle, but easily handled because the easiest solution of having just a single with() call outside the loop is also the best and an efficient solution.)

restart; 
with(Optimization);
for j to 3 do
nx := Maximize(abs(.5539395590*x^2+1.130864333*x+.9891410756-exp(x)), x=-1..1, initialpoint = {x = .5}, method = branchandbound);
end do;
[ImportMPS, Interactive, LPSolve, LSSolve, Maximize, Minimize, NLPSolve,

QPSolve]

nx := [0.0454683311488107, [x = 0.560938672728197]]
nx := [0.0454683311488107, [x = 0.560938672728197]]
nx := [0.0454683311488107, [x = 0.560938672728197]]

Here is a bug: the branchandbound method is accepted when using the "simple bounds" form like x=-1.0..1.0 but not when using it as a pair of simple constraints like . You could report that bug.

> Maximize(abs(.5539395590*x^2+1.130864333*x+.9891410756-exp(x)),
> {x<=1.0, x>=-1.0}, method = branchandbound);

Error, (in Optimization:-NLPSolve) method=branchandbound option is available for univariate unconstrained bounded problems only

> Maximize(abs(.5539395590*x^2+1.130864333*x+.9891410756-exp(x)),
x=-1.0..1.0, method = branchandbound);
[0.0454683311488107, [x = 0.560938672728197]]

So Maple should analyze the nature of the constraints before deciding it's an erroroneous input.

This worked fine for me, in a single execution block in a Worksheet.

There's no point in loading a package inside a loop, since you only need it done once. (And Maple doesn't do the rebinding of names of the package exports until the loop executes, but the body of the for-loop is determined before that occurs while the command name is still global in this context. This is subtle, but easily handled because the easiest solution of having just a single with() call outside the loop is also the best and an efficient solution.)

restart; 
with(Optimization);
for j to 3 do
nx := Maximize(abs(.5539395590*x^2+1.130864333*x+.9891410756-exp(x)), x=-1..1, initialpoint = {x = .5}, method = branchandbound);
end do;
[ImportMPS, Interactive, LPSolve, LSSolve, Maximize, Minimize, NLPSolve,

QPSolve]

nx := [0.0454683311488107, [x = 0.560938672728197]]
nx := [0.0454683311488107, [x = 0.560938672728197]]
nx := [0.0454683311488107, [x = 0.560938672728197]]

Here is a bug: the branchandbound method is accepted when using the "simple bounds" form like x=-1.0..1.0 but not when using it as a pair of simple constraints like . You could report that bug.

> Maximize(abs(.5539395590*x^2+1.130864333*x+.9891410756-exp(x)),
> {x<=1.0, x>=-1.0}, method = branchandbound);

Error, (in Optimization:-NLPSolve) method=branchandbound option is available for univariate unconstrained bounded problems only

> Maximize(abs(.5539395590*x^2+1.130864333*x+.9891410756-exp(x)),
x=-1.0..1.0, method = branchandbound);
[0.0454683311488107, [x = 0.560938672728197]]

So Maple should analyze the nature of the constraints before deciding it's an erroroneous input.

@dalmas64 You pasted the 2D Math output that (only) looked like (roman font) e^x into some plain text that did not come out as exp(x)? How did you do that, exactly? (It sounds like it'd be a bug, if you really accomplished that somehow.) Or is it the case that you actually typed e^x?

You might be interested in this useful list assembled by Robert Israel.

I agree that the whole exp(x) and e^x issue is made more difficult (especially for the new user) by the prettyprinted 2D Math display. Several of Robert's list's items should be added to Maplesoft's own FAQ lists here.

@dalmas64 You pasted the 2D Math output that (only) looked like (roman font) e^x into some plain text that did not come out as exp(x)? How did you do that, exactly? (It sounds like it'd be a bug, if you really accomplished that somehow.) Or is it the case that you actually typed e^x?

You might be interested in this useful list assembled by Robert Israel.

I agree that the whole exp(x) and e^x issue is made more difficult (especially for the new user) by the prettyprinted 2D Math display. Several of Robert's list's items should be added to Maplesoft's own FAQ lists here.

@Axel Vogt There is nothing stopping anyone from running 32bit Classic (with 32bit kernel, not any funny mismatched hybrid like I mention in another Comment in this thread) on 64bit Windows 7 Pro. I mean pristine and pure 32bit Maple, both kernel and GUIs plural, just as would be installed on XP.

I installed both 32bit Maple 14 and 64bit Maple 14 on an 8GB Windows 7 Pro machine. Sure, the 32bit app is limited to what addresses it can reference. But the overall system can still have memory to use for other apps. In other words, it is not worthless to run 32bit apps on a machine with more than 2-3 GB of main memory.

@Axel Vogt There is nothing stopping anyone from running 32bit Classic (with 32bit kernel, not any funny mismatched hybrid like I mention in another Comment in this thread) on 64bit Windows 7 Pro. I mean pristine and pure 32bit Maple, both kernel and GUIs plural, just as would be installed on XP.

I installed both 32bit Maple 14 and 64bit Maple 14 on an 8GB Windows 7 Pro machine. Sure, the 32bit app is limited to what addresses it can reference. But the overall system can still have memory to use for other apps. In other words, it is not worthless to run 32bit apps on a machine with more than 2-3 GB of main memory.

It was pretty easy to get 32bit Classic to work with 64bit Maple 14, under 64bit Windows 7 Professional. I followed this (but did it ever so slightly more simply).

Everything worked as expected from a usual Classic perspective, except the Help system. (Even the Help used to work fine in this way, for some earlier versions of Maple.) But that's ok with me, since the Help system is a separate executable in Maple 14 and can now be invoked as a stand-alone process.

I set it up so that &? acted as a prefix operator and launched the stand-alone Help system. And I also set interface(helpbrowser=text), not because it worked (it doesn't, prettily) but so that regular prefixed ? calls would not crash the session.

Here's a screenshot. Ask, if you want a screenshot of it doing something else.

First 30 31 32 33 34 35 36 Last Page 32 of 81