acer

32622 Reputation

29 Badges

20 years, 44 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

The output that you ought to have seen is (actually),

> n:=5;

                                    n := 5

> error "bad argument: %1", n; 

Error, bad argument: 5

Note the `5` appearing in the emitted error message. The %1 is a placeholder for the first parameter used in the formatting of the error message.

Here's another example,

> n:=5:

> error "%-1 argument does not match %-3 argument: %2 <> x", 13, n, 7;

Error, 13th argument does not match 7th argument: 5 <> x

acer

@Joe Riel If c23 is not zero then isn't Matrix([[0,c12,c13], [0,1,c23], [0,0,1]]) defective?

@Kitonum One question of interest involves what is it about some more general C that determines B.A uniquely. I suspect that for symmetric 3x3 C of rank r, and for 3xr A and rx3 B such that C=A.B, then B.A may be unique if the nonzero eigenvalues of C are all the same value. Markiyan (and I) would like to see that supported by a proof (or disproved, in which case necessary conditions might still be of interest).

For example, B.A does not seem to uniquely determined by 3x2 A and 2x3 B such that A.B=C for C=Matrix([[1.,1,2],[1,1,2],[2,2,2]]) which is also symmetric, of rank 2, and diagonalizable. (note. That C has two distinct nonzero eigenvalues.)

@Markiyan Hirnyk I'm not sure that I understand the English of your commented questions 1) and 2). If you are asking about B.A being uniquely determined by your C then that is interesting. I suspect that it is a consequence of the properties of the (Moore-Penrose) pseudoinverse of C, possibly combined with symmetric C having just one repeated value for its nonzero eigenvalues. I would like to see a deft proof of it.

@Markiyan Hirnyk One can consider the diagonalization of symmetric C instead, where C has dimensions m-by-m.

Let r=Rank(C). Take A=X and B=E.X^%T where E is the r-by-r diagonal Matrix of nonzero eigenvalues of C, and where X is the m-by-r Matrix whose columns are the orthonormal eigenvectors corresponding to those nonzero eigenvalues of C.

Then it should hold that C = X.E.Transpose(X) = A.B as well as that X.Transpose(X)=IdentityMatrix(m).

Then B.A = E.Transpose(X).X = E.

I used the singular value decomposition of C before, with X=U, in part because Maple returns that with S the singular values already sorted, so its easier to construct E with only nonzero eigenvalues. (That relates to C being symmetric.) 

So then one can note (by computation) that your 3-by-3 symmetric Matrix C with rank=2 is diagonalizable and has a repeated eigenvalue of value 9 (with multiplicity 2).

@xcyborg Aren't you closing the bracket too early in that first `printf` call? Don't you want M(t,t+1) to be the seventh value after the format string? Ie, the eighth argument.

@Carl Love Do you see better performance if passing the option compile=true to the dsolve/numeric step?

This kind of plotting with an image as surface texture (either image file, or ImageTools Array) can be accomplished directly in Maple 18. See here and ?plot3d,options

Eg,

restart:
with(ImageTools):
im:=Read(cat(kernelopts(mapledir),"/data/tree.jpg")):
im:=Scale(im,0.5):

plot3d(1, x=0..2*Pi, y=0..Pi, coords=spherical, style=surface,
       image=im, orientation=[-100,-70,170]);

plot3d(1, x=0..2*Pi, y=-Pi..Pi, coords=toroidal, style=surface,
       image=im, scaling=constrained, orientation=[-70,-40,180]);

GUI performance is better if the image dimensions are not large.

acer

Maple 18 has this as a new feature for 2D plots. See the `size` option described on ?plot,options

acer

Maple 18 has this as a new feature for 2D plots. See the `size` option described on ?plot,options

acer

The Online Help now reflects version 18.

Overview of What's New

Index of New Commands and Packages in Maple 18

The sidebar browser on that page also shows more details of individual enhancements that do the product pages off the main corporate website. Eg, here.

And code (where it appears) shows in a larger font, at this time. Eg. compare this with this.

I interpreted the question as being one in which the relative multiplicity of members would not matter, and that mere membership in the second list would warrant its removal. I noticed the discrepency in results and figure that the OP had made a typo.

The operation is not well defined by the provided single example alone, though it might be guessed correctly.

It seems a bit unusual to me, if the multiplicities must match exactly but the order doesn't matter.

Anyway, if I misinterpreted the question, then just ignore my answer.

@Christopher2222 You wrote, "rosettacode updates from Maple users are old and almost non-existant."

Are you suggesting that Maple users add entries? Have you contributed?

@henrylyl I downloaded a new installer for the MaplePlayer yesterday. The installer was named MaplePlayer18WindowsX64Installer.exe .

I installed it, but it does not have a restart icon on the menubar.

@Christopher2222 Well, if you don't have a definition for where some border may start or finish then chopping the eyeballed image with simple rtable indexing might suffice.

For the above code (leading up to that assignment of a procedure to `p`, one could instead have,

restart:
with(ImageTools):

img1 := Read(cat(kernelopts(homedir),"/Documents/circshift/13ydvt0.jpg")):
img2 := Read(cat(kernelopts(homedir),"/Documents/circshift/30rkxvt.jpg")):

img1,img2:=img1[1+2..-1-2,1+2..-1-2],img2[1+2..-1-2,1+2..-1-2]:
img1,img2 := Scale(img1,1..184,1..184),Scale(img2,1..184,1..184):

with(ArrayTools):
A:=Reshape(img1,[1..184*184]):
B:=Reshape(img2,[1..184*184]):

and so on. That produces this result image:

 

First 362 363 364 365 366 367 368 Last Page 364 of 597