720 Reputation

11 Badges

9 years, 13 days

MaplePrimes Activity

These are questions asked by sand15

Hi everybody,

I have written a module (let's say MyModule) that  I use as a package in a worksheet (with(MyModule)).

At some point in my worksheet I call the procedure MyProc which is part of MyModule.
I find it not to work as expected. So I modify it within MyModule and generate again the archive which contains this module.

Because my worksheet does a lot of things before the call to MyProc, I would like to test quickly the above modifications.
The idea is to do :
unwith(MyModule):  # packages() no longer exhibits its name
with(MyModule);      # to load the corrected one

Unfortunately, contrary to what happens with a "native" package,  the command unwith(MyModule) is ineffective:

  • once done showstat(MyProc) still displays the content of the procedure, and running  the command MyProc(...) proves that it still "exists" in the worksheet
  • forcing a reload of MyModule ( with(MyModule) ) and acanning again MyProc ( showstat(MyProc) ) reveals the code MyProc had when MyModule has been loaded for the first time.


Is it possible to "free" a user package through the "unwith" command ?

Hope to read you soon, TIA

PS : to be clearer

A worksheet contains  the definition of N procedures, plus the one of MyModule, and ends with the commands to generate an archive file named MyModule.mla.
MyModule is defined that way

MyModule := module()
option package

export Proc1 := eval(:-Proc1),
           MyProc := eval(:-MyProc),
           ProcN := eval(:-ProcN):
end module


Hi everybody,

I have two questions about DataSummarize when used with "summarize=embed"

  1. Is it possible to set the width of the table DataSummarize returns ?
    (I thought DataSummarize used DocumentTools[Tabulate] but the option "width=..." doesn't work)
  2. Is it possible to save this table programmatically (for instance in a jpeg file) ?

Thanks in advance.





I am doing Principal Component Analysis (PCA) and I think the Biplot procedure could be improved.

When you use PCA is common to look what happens in other planes than the plane defined by the first two eigenvectors.
Unfortunately Biplot deals only with 2D projections onto this first plane and with 3D projections onto the space spanend but the first three eigenvectors.

I modified slightly the original Biplot procedure for it to handle different 2D and 3D projections planes.
The code is given in the attached mw file (original commands are written red over yellow and the new ones yellof over red).

I'm not at all certain mapleprimes/questions is the best place to post ???


This sequence of commands works perfectly well

     plotsetup(jpeg, plotoutput=SomeJpegFile);
     plot(x, x=0..1);

Why this one doesn't create the file SomeJpegFile ?

f := proc()
     plotsetup(jpeg, plotoutput=SomeJpegFile);
     plot(x, x=0..1);
end proc;


Thanks in advance



I use Statistics[Biplot] and the rendering is very bad with those huge arrows.

For the moment I fix this by modifying the definitions of the curves which draw each arrow (after using getdata to recover the Biplot structure)

Does it exist a simpler way to manage the appearance of the arrows ?
(options cb, cw and ch of plottols[arrow] are incorrect in Statistics[Biplot](..., arrow=[...]).

Thanks in advance

First 11 12 13 14 15 16 17 Last Page 13 of 21