acer

32313 Reputation

29 Badges

19 years, 313 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

I don't have a copy of that ebook at hand, so I'm not sure what files come with it. Does it come with a .hdb file, or is it all just .mw or .mwz?

You might be able to add something to the context-sensitive menus. Those are the pop-up menus that you get when you right-click on output in your worksheet.

For example, you could try replacing that foo.mw with (the full path to) that Table of Contents file in this code below,

pCM := ContextMenu:-CurrentContext:-Copy():
pCM:-Entries:-Add("my fave worksheet",
        "INTERFACE_WORKSHEET('display','file'=`foo.mw`)",
        'anything'
                 ):
ContextMenu:-Install(pCM);

After issuing those commands, then whenever I right-click on any output there is a new item in the context-menu that appears. (It doesn't appear if I right-click on the blank background, which is too bad.) Selecting it causes foo.mw to be opened in a new tab. Maybe that will work for your file too. If it does, you could consider adding that code to your Maple initialization file.

Alternatively, you could add an alias or simple command to your initialization file, which just runs that INTERFACE_WORKSHEET command. So you wouldn't have to search for the file every time. You could just type in that short call.

Of course, neither approach will work if INTERFACE_WORKSHEET does not cause that special file to be loaded. (I don't know for a fact that your file is a worksheet, or even that some part of your ebook opens as a worksheet. Maybe it opens in a special reader.

I would have thought that the top menubar's Tools dropdown menu might get a submenu (named, say, ebooks) which would then show what was available. BTW, did your ebook's installation prompt for a preferred location?

acer

It has been suggested in the past that changing the current binding for a name (almost always) doesn't affect routines In Maple's own Library, since those get saved with the binding at their creation time. Sometimes this is a pain, but perhaps in this case it might help.

> myD:=module() option package; export D; end module:
> with(myD): unprotect(D):

> D:=4: 17*D;
                                      68
 
> :-D(sin);
                                      cos
 
> convert(diff(f(x),x),:-D);
                                    D(f)(x)
 
> eval(%,f=tan);
                                            2
                                  1 + tan(x)

Notice that in the above, where it looks like I am assigning to D, I am really just assigning to myD:-D.

Also, regardless of what else you've assigned, or loaded, etc, you should always be able to call :-VectorCalculus:-D. So, continuing from on the above, in the same session,

> V := Vector[row]([sin,ln]);
                                V := [sin, ln]
 
> :-VectorCalculus:-D(V);
                                [cos, z -> 1/z]

acer

Are you looking for a Maple program for this? You should be able to do this simply, with one for..do loop within another, using the isprime routine and a few loop control variables.

Is this for an assignment in an academic course? If so then how far have you gotten so far?

acer

> f:= (m,n) -> Array(1..m,1..n,[seq(combinat:-randperm(n),i=1..m)]):

> f(3,5);
                            [2    4    5    1    3]
                            [                     ]
                            [2    4    3    1    5]
                            [                     ]
                            [5    3    1    2    4]

acer

Who recommends using textplot and the SYMBOL font, when using Maple's Standard GUI?

Can you not simply use the techniques described on the ?plot,typesetting help-page?

See ?plot,device and ?plot,setup if you are not familiar with how to programatically export plots to gif, jpeg, etc.

acer

Could someone please explain the syntax used in stating this problem? Thanks.

[updated] Please ignore the above. I've got it now.

acer

Did you mean something like this, in particular for that limit?

> restart:

> limit(sum(1/exp(1/n),n=1..N),N=infinity);
                                   infinity

> sum(n/(n+1),n=1..infinity);
                                   infinity

acer

> M:= Matrix([[1,2,3],[4,7,9],[5,7,11]]);
                                   [1    2     3]
                                   [            ]
                              M := [4    7     9]
                                   [            ]
                                   [5    7    11]
 
> ArrayTools:-AddAlongDimension(M,2);
                                     [ 6]
                                     [  ]
                                     [20]
                                     [  ]
                                     [23]

acer

Could you not put all the code inside one or more procedures, and have the Components simply contain only the appropriate procedure calls?

You might even put the code which defines those procedures inside the "hidden" StartUp Code region of the worksheet. (See top-menubar's Edit -> StartUp Code choice.)

Then you can call and re-use the same procedures in several different Components, and yet editing could be done in one single location -- wherever you define the procedures.

acer

> eq2 := Int(x^(2*k)/(1+x^(2*k))^2, x = 0 .. 1):
> with(IntegrationTools):
> eq3 := Change(eq2, u = x^(2*k), u) assuming k::posint:

> value(eq3) assuming k::posint;

                                  2 k + 1    4 k + 1
                    hypergeom([2, -------], [-------], -1)
                                    2 k        2 k
                    --------------------------------------
                                   2 k + 1
 
> limit(convert(%,MeijerG), k = infinity) assuming k::posint;
                                       0

> limit(convert(%%,MeijerG), k = infinity);
                                       0

acer

Using a translation of the Mma code here to get Carmichael numbers,

> seq(`if`(modp(n,numtheory[lambda](n))=1 and
>          not isprime(n), n, NULL), n=1..10000);
                    561, 1105, 1729, 2465, 2821, 6601, 8911

See the Comment section at that link.

acer

eqn := Diff(a(x)*b(x),x) = diff(a(x)*b(x),x);

neweqn := isolate(eqn, diff(b(x),x)*a(x));

Now, supose you have an expression, and you wish to use the above identity to substitute,

expr := sin(x)*exp(diff(b(x),x)*a(x));

eval(expr, neweqn);

acer

with(Student:-VectorCalculus):

C := <2*exp(t),exp(2*t)*cos(t),exp(2*t)*sin(t)>;

ArcLength(C, t=0..ln(3));

acer

If you really, really want to,

> F:=proc(L::evaln)
>   L:=subsop(1=NULL,eval(L));
> end proc:

> L:=[x,y,z,d];
                               L := [x, y, z, d]
 
> F(L);
                                   [y, z, d]
 
> F(L);
                                    [z, d]
 
> F(L);
                                      [d]
 
> F(L);
                                      []

Alternatively,

> restart:

> F:=proc(L)
>   L:=subsop(1=NULL,eval(L));
> end proc:

> L:=[x,y,z,d];
                               L := [x, y, z, d]
 
> F('L');
                                   [y, z, d]
 
> F('L');
                                    [z, d]
 
> F('L');
                                      [d]
 
> F('L');
                                      []

Some people think that this sort of thing is evil.

acer

Do the values in Matrix M appear correct, if you run this code below?

A := ExcelTools:-Import("Density.xls");

interface(rtablesize=50):
M:=Matrix(A);

There are several plotting choices available. This is just one such (presuming that I've interpreted the data structure ok),

plots:-pointplot3d([seq(seq([M[i,1],M[3,j],M[i,j]],j=2..6),i=4..11)],
                   axes=boxed,symbol=solidcircle,
                   labels=[Temperature,Pressure,Density]);

acer

First 305 306 307 308 309 310 311 Last Page 307 of 336