acer

32632 Reputation

29 Badges

20 years, 47 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

I realized that was your line of thinking, when I posted. And that is why I mentioned the 'parameters' option. Have a look at it. It might help you pull out the dsolve call (which is heavy machinery), and allow you to specify the w1_1, w1_2, and w1_3 as parameters. At the very least, you can pull out the diff calls.

acer

Why are those (unchanging) diff calls inside the loop? They don't need to be done 70000 times, right? Not the main culprit, perhaps, but it's often good to look at such aspects.

Do you really need Digits=16, which is just one digit of working precision above the cuttof between fast double-precision and slower "software" precision.

Can you replace that Normalize call with something that acts in-place? (Either a Compiler:-Compile'd in-place proc of your own, or exisiting call to Norm and a call to VectorScalarMultiply with its inplace option, etc).

Does the dsolve,numeric call really need to be inside the loop, or could it too be called just once up front with its new 'parameters' option to handle the changing w1? See the ?dsolve,numeric,IVP help-page.

That's all presupposing that you don't want to change the basic approach.

acer

Yes, VerifyTools can be useful.

It's a pity that some packages which can sometimes be useful (such as VerifyTools, EqualEntries, PiecewiseTools, etc) are undocumented.

I should submit an SCR that VerifyTools is not protected (and then put on the list of undocumented protected names).

acer

Yes, VerifyTools can be useful.

It's a pity that some packages which can sometimes be useful (such as VerifyTools, EqualEntries, PiecewiseTools, etc) are undocumented.

I should submit an SCR that VerifyTools is not protected (and then put on the list of undocumented protected names).

acer

Round-brackets also provide for some distinct aspects of rtable selection/subindexing.

While it's unfortunate that some help-pages themselves inadequately cover the functionality of their topic commands, it can be more unfortunate if relevant help-pages are missing adequate cross-referencing or are too hard to find.

For example, there should be better cross-referencing from ?Matrix, ?Vector, and ?rtable to ?selection and ?rtable_indexing. I will submit an SCR for that.

acer

Round-brackets also provide for some distinct aspects of rtable selection/subindexing.

While it's unfortunate that some help-pages themselves inadequately cover the functionality of their topic commands, it can be more unfortunate if relevant help-pages are missing adequate cross-referencing or are too hard to find.

For example, there should be better cross-referencing from ?Matrix, ?Vector, and ?rtable to ?selection and ?rtable_indexing. I will submit an SCR for that.

acer

1) vertical bars around a name don't act as quotes.

2) See the help-page on concatenation.

3) Read the manuals, in general.

As for this other thread,

4) For an lowercase array (or table) use evalm to see its contents. See the last_name_eval help-page.

5) Use Array instead of array, since the latter is deprecated.

acer

1) vertical bars around a name don't act as quotes.

2) See the help-page on concatenation.

3) Read the manuals, in general.

As for this other thread,

4) For an lowercase array (or table) use evalm to see its contents. See the last_name_eval help-page.

5) Use Array instead of array, since the latter is deprecated.

acer

And yet it seems a safe bet that you have gotten there by luck and exhaustive search. True understanding will serve you better in the long run. Hence I suggest a good read of the relevant manual pages.

Note that in your code fragment, the last || and `` don't accomplish much of anything; they just append `` (empty name) to the end.

> for i from 1 to 3 do
>   i, `a_`||i
> end do;
                                    1, a_1
 
                                    2, a_2
 
                                    3, a_3

acer

And yet it seems a safe bet that you have gotten there by luck and exhaustive search. True understanding will serve you better in the long run. Hence I suggest a good read of the relevant manual pages.

Note that in your code fragment, the last || and `` don't accomplish much of anything; they just append `` (empty name) to the end.

> for i from 1 to 3 do
>   i, `a_`||i
> end do;
                                    1, a_1
 
                                    2, a_2
 
                                    3, a_3

acer

It's often better to ask separate (entirely more general) questions in a new thread. That way both topics and their answers are less confusing.

Exporting as a Maplet does nothing except save the code to a file with extension .maplet. It won't actually be a Maplet, or ever cause a Maplet to be run, unless the code you first write uses the routines in the Maplets package.

acer

It's often better to ask separate (entirely more general) questions in a new thread. That way both topics and their answers are less confusing.

Exporting as a Maplet does nothing except save the code to a file with extension .maplet. It won't actually be a Maplet, or ever cause a Maplet to be run, unless the code you first write uses the routines in the Maplets package.

acer

Sure. But what you write about "fixed, local" locations is also true of libname and .mla Library archives. (BTW, one could also save the Maplet, inside a launching proc, to a Library archive, and then call from any new session.)

The request to attach, somehow, a maplet to the GUI menus without having it point at a fixed location (of either .maplet or .mla file) seems odd to me. What, precisely, would it be stored as/by/to?

acer

Sure. But what you write about "fixed, local" locations is also true of libname and .mla Library archives. (BTW, one could also save the Maplet, inside a launching proc, to a Library archive, and then call from any new session.)

The request to attach, somehow, a maplet to the GUI menus without having it point at a fixed location (of either .maplet or .mla file) seems odd to me. What, precisely, would it be stored as/by/to?

acer

The ?comment help-page read from the Standard GUI of Maple 13 mentions the use of multi-line comments. The ?comment help-page available in the commandline (and Classic?) interfaces does not mention it.

Setting up one's Maple prompt to be the empty comment (**) in the commandline interface is neat. It allows one to copy the entire text of input including the prompt and then insert it as runnable code.

As noted in ?comment, the pasting will only work properly in 1D Maple input mode. It works handlily for inserting into the commandline interface, or into a Worksheet with 1D Maple input mode in Standard.

My Linux ~/.mapleinit file now contains,

interface(prompt=" (**) "):

One could also put that inside a conditional using IsWorksheetInterface(), to get it in commandline but not in Standard.

Someone pointed out to me that it is also documented in ?include in Maple 12, where it also appears to work. (Your mileage may vary.)

acer

First 482 483 484 485 486 487 488 Last Page 484 of 597