sand15

555 Reputation

10 Badges

5 years, 10 days

MaplePrimes Activity


These are questions asked by sand15

Hi everybody,

Please take the example given in the help pages of DocumentTools[Tabulate] (the one where a cardinal sine is plotted)
Change plot(sin(x)/x) by plot(sin(x),/x, legend=sinc(x))

The legend doesn't appear if the list (named "A" in the help page) is displayed through DocumentTools:-tabulate.

Is it possible to circumvent this problem ?

TIA

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.

 

 

 

Hi,

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 ???


Biplot.mw

Hi,

This sequence of commands works perfectly well

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


Why this one doesn't create the file SomeJpegFile ?

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

f();


Thanks in advance

First 7 8 9 10 11 12 13 Last Page 9 of 17