acer

32373 Reputation

29 Badges

19 years, 334 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

I believe that the issue is that there is no Smart Popup for the result of expanding (x+y)^19. In other words, not for selecting the output (x+y)^19 but rather for selecting all of its expanded form as output.

And I see the same behaviour in Maple 16. There is no Smart Popup appearing for,

y^19+19*x*y^18+171*x^2*y^17+969*x^3*y^16+3876*x^4*y^15+11628*x^5*y^14+27132*x^6*y^13+50388*x^7*y^12+75582*x^8*y^11+92378*x^9*y^10+92378*x^10*y^9+75582*x^11*y^8+50388*x^12*y^7+27132*x^13*y^6+11628*x^14*y^5+3876*x^15*y^4+969*x^16*y^3+171*x^17*y^2+19*x^18*y+x^19

For that output, the Library routine which prepares Smart Popop menus appears not to get invoked.

acer

I believe that the issue is that there is no Smart Popup for the result of expanding (x+y)^19. In other words, not for selecting the output (x+y)^19 but rather for selecting all of its expanded form as output.

And I see the same behaviour in Maple 16. There is no Smart Popup appearing for,

y^19+19*x*y^18+171*x^2*y^17+969*x^3*y^16+3876*x^4*y^15+11628*x^5*y^14+27132*x^6*y^13+50388*x^7*y^12+75582*x^8*y^11+92378*x^9*y^10+92378*x^10*y^9+75582*x^11*y^8+50388*x^12*y^7+27132*x^13*y^6+11628*x^14*y^5+3876*x^15*y^4+969*x^16*y^3+171*x^17*y^2+19*x^18*y+x^19

For that output, the Library routine which prepares Smart Popop menus appears not to get invoked.

acer

The Online Help is also updated, and links off the What's New pages have some additional detail (some with .mw links).

acer

With the (elementwise) ~ operator modifier, it can be shorter of course.

expand~(convert~(q,exp));

                             [  0    -omega  0]
                             [                ]
                             [omega    0     0]
                             [                ]
                             [  0      0     0]

(expand@convert)~(q,exp);

                             [  0    -omega  0]
                             [                ]
                             [omega    0     0]
                             [                ]
                             [  0      0     0]

But those are not as short as Carl's,

(simplify@expand)~(q);

                             [  0    -omega  0]
                             [                ]
                             [omega    0     0]
                             [                ]
                             [  0      0     0]

acer

With the (elementwise) ~ operator modifier, it can be shorter of course.

expand~(convert~(q,exp));

                             [  0    -omega  0]
                             [                ]
                             [omega    0     0]
                             [                ]
                             [  0      0     0]

(expand@convert)~(q,exp);

                             [  0    -omega  0]
                             [                ]
                             [omega    0     0]
                             [                ]
                             [  0      0     0]

But those are not as short as Carl's,

(simplify@expand)~(q);

                             [  0    -omega  0]
                             [                ]
                             [omega    0     0]
                             [                ]
                             [  0      0     0]

acer

I tried a drop-in replacement (with .dll file rename, copying the old aside, etc) using libgmp 5.0.1 and a binary built with mingw64.

On an Intel i7-930 using Maple 16.02 64bit I got a speedup from 105 sec down to 56 sec for the computation of,

evalf[4*10^5](ln(5)):

The digits appear to be correct. And it might be that other improvements are possible due to new functions available in 5.0.0.

And the timings listed above are for 5.0.1, but the latest release is 5.1.1 and supposedly Windows 64 performance gained ground in 5.1.0.

If the version of libgmp used in Maple 14 was already overdue for an update then it must surely be even more pressing in the Maple 16 life cycle.

acer

This is interesting.

Carl, I'm no expert but Times New Roman might be a place to start with a unicode chart, or Courier New. The former is what M16.02 uses for 2D Math output on my Windows 7, and the latter is what it uses for my 1D input. Or so it seems.

Alejandro, thanks very much. This works for me, then.

unicode:=(s::string)->cat(`&#`,sscanf(s,"%x")[],`;`):
T:=unicode("00A9"):
Typesetting:-mi(cat(T,` `),fontweight="bold",
                mathcolor="#c800c8",size="50");

As you may have guessed, I was thinking more about a size modifier for the MathML-like atomic-identifier-like names than I was about Typesetting calls. Your suggestion involving calls to Typesetting gets what I was after, thank you, but I still wonder about another form.

acer

Yes, it is a good idea. It's a better idea in general than using evalf/Int on the procs returned by dsolve/numeric. This mathoverflow thread is not addressing the same computational task.

I mean "better" in a sense of doing numerical computations accurately, in general. The fact the the given problem may well be computed adequately accurately, at default Digits and default accuracy, is irrelevant to distinctions between the two approaches in general.

acer

Yes, it is a good idea. It's a better idea in general than using evalf/Int on the procs returned by dsolve/numeric. This mathoverflow thread is not addressing the same computational task.

I mean "better" in a sense of doing numerical computations accurately, in general. The fact the the given problem may well be computed adequately accurately, at default Digits and default accuracy, is irrelevant to distinctions between the two approaches in general.

acer

A useful post, thank you Carl.

Some users of the Standard GUI might also find Unicode representation of interest, even though not all symbols may be supported by available fonts.

 

sscanf("221A","%x")[];  # hexadecimal to decimal

8730

`√`;

`√`

`#mrow(mo(√),mn(x))`;

`#mrow(mo(√),mn(x))`

seq(cat(`&#`,i,`;`),i=8710..8730);

`∆`, `∇`, `∈`, `∉`, `∊`, `∋`, `∌`, `∍`, `∎`, `∏`, `∐`, `∑`, `−`, `∓`, `∔`, `∕`, `∖`, `∗`, `∘`, `∙`, `√`

seq(cat(`&#`,i,`;`),i=1110..1130);

і, ї, ј, љ, њ, ћ, ќ, ѝ, ў, џ, Ѡ, ѡ, Ѣ, ѣ, Ѥ, ѥ, Ѧ, ѧ, Ѩ, ѩ, Ѫ


and so on.

Download unicode.mw

See also here and here.

Does anyone know what is the TypeMK modifier for (font) size?

The purple square below gets rendered as the copyright symbol in green foreground and purple background in Maple's Standard GUI. But I suppose that rendering via Mapleprimes's maplenet may not handle that.

 

unicode:=(s::string)->cat(`&#`,sscanf(s,"%x")[],`;`):

unicode("00A9");
convert(%,string)[3..-2];

`©`

"169"

T:=cat(`#mo(`,
       unicode("00A9"),
       `,mathbackground="purple",mathcolor="lime"))`);

`#mo(©,mathbackground="purple",mathcolor="lime"))`

plots:-display(
  plots:-textplot([2,2,sprintf(unicode("00A9"))]),
  plots:-textplot([3,3,T])
  , view=[1.0..4,1..4]);

 

 

Download unicode2.mw

acer

I suppose that this has been done before... and likely done better too. But I may as well make it into a procedure.

restart:

cellplot:=proc(M::Matrix)
   local colorlist,m,n,i,j,Plines,Ppoints,v,vals;
   uses LinearAlgebra,plots,plottools;
   m,n:=Dimensions(M);
   Plines:=display(
      seq(seq(`if`(M[m+1-j,i-1]<>M[m+1-j,i],
                   line([i-0.5,j-1+0.5],[i-0.5,j+0.5]),NULL),
              j=1..m),i=2..n),
      seq(seq(`if`(M[m+1-j,i]<>M[m+2-j,i],
                   line([i-0.5,j-1+0.5],[i-0.5+1,j-1+0.5]),NULL),
              j=2..m),i=1..n),
      ':-view'=[1-0.48..m+0.48,1-0.48..n+0.48]);
   vals:=[{seq(v, v in M)}[]];
   colorlist:=setcolors();
   Ppoints:=display(
      seq(sparsematrixplot(Matrix(m, n,
                                  (i,j)->`if`(M[m+1-i,j]=vals[k],1,0))
                           ,`if`(nops(colorlist)>=nops(vals),
                                 ':-color'=colorlist[k],NULL)
                           ,':-symbol'=':-solidcircle', tickmarks=[0,0]
                           ,':-symbolsize'=20, ':-legend'=vals[k]
                           , _rest),
          k=1..nops(vals)));
   display( Plines, Ppoints, ':-labels'=[``,``], ':-axes'=':-boxed' );
end proc:

A:=LinearAlgebra:-RandomMatrix(10,generator=-7..-5):

cellplot(A);

cellplot(A, legend=NULL, symbolsize=1);

cellplot(A, legend=NULL, symbol=solidbox, symbolsize=68); # not a great idea

acer

I suppose that this has been done before... and likely done better too. But I may as well make it into a procedure.

restart:

cellplot:=proc(M::Matrix)
   local colorlist,m,n,i,j,Plines,Ppoints,v,vals;
   uses LinearAlgebra,plots,plottools;
   m,n:=Dimensions(M);
   Plines:=display(
      seq(seq(`if`(M[m+1-j,i-1]<>M[m+1-j,i],
                   line([i-0.5,j-1+0.5],[i-0.5,j+0.5]),NULL),
              j=1..m),i=2..n),
      seq(seq(`if`(M[m+1-j,i]<>M[m+2-j,i],
                   line([i-0.5,j-1+0.5],[i-0.5+1,j-1+0.5]),NULL),
              j=2..m),i=1..n),
      ':-view'=[1-0.48..m+0.48,1-0.48..n+0.48]);
   vals:=[{seq(v, v in M)}[]];
   colorlist:=setcolors();
   Ppoints:=display(
      seq(sparsematrixplot(Matrix(m, n,
                                  (i,j)->`if`(M[m+1-i,j]=vals[k],1,0))
                           ,`if`(nops(colorlist)>=nops(vals),
                                 ':-color'=colorlist[k],NULL)
                           ,':-symbol'=':-solidcircle', tickmarks=[0,0]
                           ,':-symbolsize'=20, ':-legend'=vals[k]
                           , _rest),
          k=1..nops(vals)));
   display( Plines, Ppoints, ':-labels'=[``,``], ':-axes'=':-boxed' );
end proc:

A:=LinearAlgebra:-RandomMatrix(10,generator=-7..-5):

cellplot(A);

cellplot(A, legend=NULL, symbolsize=1);

cellplot(A, legend=NULL, symbol=solidbox, symbolsize=68); # not a great idea

acer

M:=LinearAlgebra:-RandomMatrix(13,13,generator=1..2);

Of course, for larger dimensions it should be built differently, more efficiently. (If your example was meant only as an illustrative toy example then you might consider using `implicitplot`. Or not..)

I didn't state it before, but of course you could view Plines without Ppoints.

acer

M:=LinearAlgebra:-RandomMatrix(13,13,generator=1..2);

Of course, for larger dimensions it should be built differently, more efficiently. (If your example was meant only as an illustrative toy example then you might consider using `implicitplot`. Or not..)

I didn't state it before, but of course you could view Plines without Ppoints.

acer

No, it would be very unwise.

acer

First 377 378 379 380 381 382 383 Last Page 379 of 592