Items tagged with blogblog Tagged Items Feed

saving localness

September 03 2009 by Maple

2

0

Not all objects can be saved to .m and retrieved sucessfully in a restarted or new session. This is the case not only for "escaped" locals, but also for some objects implemented as function calls of a module member.

> restart:

> t := ScientificConstants:-Constant('c'):

> type(t, specfunc(anything,ScientificConstants:-Constant));
true

> ScientificConstants:-GetValue(t...

refreshed components

June 20 2009 by Maple

4

0

I was just reminded of an aspect of Maple GUI Components, new to Maple 13, that has sometimes come in very useful to me. It is the ability to refresh a component programatically.

I should explain. The old (and current default) behaviour is for the GUI not to refresh any other components until the current component is finished (ie. returns control).

The relevant situation in which this matters is when a given component has action code whose

TrueType font for Maple in Linux

April 07 2009 by Maple

2

1

On some Linux distributions, the default font (Lucida Bright at size 12) for text mode in Maple's Standard GUI doesn't look as good as it might at the default magnification.

Here's a screenshot of Maple 12 and some text in a worksheet (on my very old Fedora Core 2).

fortuna's wheel

March 07 2009 by Maple

2

0

I was considering what sorts of "normally coded" things might get broken by the loading of a Maple Library package and the ensuing rebinding of names.

And so I tried this,

> with(RealDomain): # rebinds sin

> convert( cos(x), sin );
sin(2 x)
1/2 --------
sin(x)


I was actually surprised to see that work OK. I was expecting convert...

set ordering change

March 05 2009 by Maple

1

6

The following type of difference in behaviour, due to deterministic ordering of sets as introduced in Maple 12, may affect implementations of some algorithms.

    |\^/|     Maple 11 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2007
<____ ____>  Waterloo Maple Inc.
|       Type ? for help.

> seq(x, x in {a,b,c,d,e,f,g}) assuming d>0;
...

CorrelationMatrix efficiency

February 17 2009 by Maple

2

1

This is a follow-up to an earlier post about CovarianceMatrix.

There are several ways in which Statistics:-CorrelationMatrix can be improved.

CorrelationMatrix shares some inefficiencies with CovarianceMatrix, by computing correlations between the n columns, pairwise. But in doing so it also computes...

CovarianceMatrix efficiency

January 20 2009 by Maple

2

1

Some years ago, before the advent of the Statistics package, a colleague asked for a fast way to generate thousands of normally distributed random numbers in Maple. The suggestion that worked quickest and most easily (using existing, simple Maple Library routines) was to generate random deviates using the usual formula associated with the distribution. But the key was to replace the scalar values (representing the uniformly distributed input) with a whole Matrix of input values....

November 15 2008 by Maple

Every now and then someone will post here on Mapleprimes and the code will use an older package such as linalg or stats. Quite often it is clear that the poster is new to Maple. Yet these packages have been superceded with new ones, eg. LinearAlgebra and Statistics.

One obvious question that then arises is: how did this user decide to use the older package?

I just did a google search on

November 05 2008 by Maple

5

1

Over on the usenet newsgroup comp.math.soft-sys.maple, someone asked about using Maple's overload facility to redefine the operators such as *, +, etc.

The difficulty for the submitter is that while overload (and option overload for procedures) can provide enhanced operators for new routines, it doesn't affect routines saved in the Maple Library which already have their bindings. Overloading does not subsequently change the bindings of the operators when used in (most all) Library routines.

One way to try and get around this is to actually redefine the global operators. And since overload is on topic, one can still use it in the replacements that one writes.

In order to redefine global operators one must first unprotect them. They are protected for a very good reason. If the replacements are not adequate then Maple can fail in a multitude of ways. It's a case of caveat emptor.

poll: change in Maple that you want...

November 02 2008 by Maple

What single change in Maple would you want more than any other?

Maybe it's an enhancement, or a functionality change, or a bug fix.

forget and option cache

October 15 2008 by Maple

2

0

It looks like forget works on procedures with option 'cache'.

I realize that there is a routine Cache:-RemovePermanent. But should forget be clearing the permanent Cache entries for a procedure?

> cacheFunc := proc() option cache; print(args); args; end proc:
> Cache:-AddPermanent( cacheFunc, [5], 10 );
> op( 4, eval(cacheFunc) );
Cache(512, 'permanent' = [5 = 10])

> forget(cacheFunc);
> op( 4, eval(cacheFunc) ); # NULL return, it's empty


opening worksheets in existing Maple...

October 01 2008 by Maple

Here's a first working shot at an external, programmatic mechanism for opening .mw worksheets/Documents as new tabs in an already running Maple Standard GUI session.

This involves a sh shell script, runnable in Unix/Linux/OSX/cygwin. Maybe someone could post a MS-Windows .bat batch file equivalent.

The basic idea is this: you have a GUI session open. But you want to be able to open other .mw files in that session without having to go through the GUI's File->Open menu every time ...

context driven help suggestions

September 25 2008 by Maple

3

0

Maple's Standard GUI has context-sensitive menus. Those are the menus that appear when one right-clicks on a output (or input, in a Dcoument).

Below is an example which adds a new submenu. The new submenu is populated automatically according to the types of thing found within the object itself.

It's an alternative to a menu-item that already exists, which shows up as "Help on Command". But that existing item only...

undoing one form of symbolic root

August 25 2008 by Maple

2

0

In this previous post, an example is shown that demonstrates the potential problems that can arise following symbolic conversions such as from sqrt(x^2)  to x^(1/2).

Here x is an unknown symbol. The difficulties include the fact that, while sqrt can be smart about simplifying numeric values (eg. integers, rationals) the ^ operator has no such opportunity. Once the conversion from sqrt...

subsop example

August 21 2008 by Maple

0

9

> q := x^(1/2):

> type(q, ^);
true
> op(0,q);
^

> subsindets(q, ^, f->subsop(0=H,f));
Error, (in unknown) improper op or subscript selector


What's wrong with that last one? It's modelled on the first Example in the ?subsindets help-page.

Are there cases where...

 3 4 5 6 7 Page 5 of 7