4601 Reputation

10 Badges

9 years, 120 days

MaplePrimes Activity

These are questions asked by tomleslie

If I create  and save a worksheet in Maple 2019, then try to up load it here, it uploads but contents won't display

No issue if I have an "identical" worksheet in Maple 2018.

See the attachment attempts below

#### Result of trying to upload Maple 2019 file here

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/ .


But "same" file from Maple 2018 "works"

# Recursive Fibonacci generator
  myFib:= proc(n::integer)
               option remember;
               if   n=1
               then return 1
               elif n=0
               then return 0
               else return myFib(n-1)+myFib(n-2):
          end proc:

  seq(myFib(j), j=0..20);

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765





You use curly braces, ie '{}' as a container. Within Maple such curly braces designate a set, and Maple will always display sets in "lexicographic" order.

Since order has no meaning for entries in a set, trying to "sort" a set is meaningless. You can only sort lists, Arrays etc where the concept of order meaningful

See the attached for examples of sorting sets, lists, Arrays, and note that sorting of sets doesn't do anything useful

For future reference

  1. This should be a "Question", not a "Post" (and if I knew how to move it I would!)
  2. When posting on this site, try to avoid using third party sites like dropbox. Upload code (not pictures of code) using the big green up-arrow in the Mapleprimes toolbar

# Try sorting sets - won't work because
# order is meaningless in a set
  sort( {abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)}, `<`);
  sort( {abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)}, `>`);
# Do the same thing with lists, where order is significant
  sort( [abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)], `<`);
  sort( [abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)], `>`);
# You can also sort entries in an Array()
  sort(Array([abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)]), `<`);
  sort(Array([abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)]), `>`);

alpha := [2, 3, 4, 5]


{25, 26, 27, 28}




{25, 26, 27, 28}




[25, 26, 27, 28]




[28, 27, 26, 25]




Vector[row](4, {(1) = 25, (2) = 25, (3) = 25, (4) = 25})




Array(%id = 18446744074423548974)





Vector[row](4, {(1) = 25, (2) = 25, (3) = 25, (4) = 25})




Array(%id = 18446744074423548974)






Earlier today (30/12/2018), I answered a fairly routine question  relating to solving the PDE for a vibrating string problem where the initial string profile was given by a piecewise function. No big deal - a fairly simple answer. Only thing that struck me at the time as odd/unusual, was that 2-3 days ago there was a very (very!) similar problem which I had also answered.

These two problems were posted from different usernames, but I did reference the earlier problem in my solution to the later one, just because they were so similar.

Both of these questions (and obviously my answers) have now "disappeared" -how/why?

  1. I can (just about?) understand that an OP might be allowed to delete his/her question, but I am surprised that (s)he can delete a complete thread - ie after response(s) have been provided
  2. I suspect that both questions came from the same individual employing different user names (why?). I guess this is pretty much impossible for MapleSoft to verify, particularly if the OP has multiple email addresses??
  3. Would I be correct in assuming that this is a method for students to get their homework" done whilst leaving little/no trace for their academic supervisors to find?
  4. Since all trace of both questions have disappeared and I can't actually remember the usernames (or emails with which they are associated), presumably the OP could repeat this behaviour indefinitely?

Whilst trying to debug another problem on this site, this one

I came across a Maple bug(?) which was so serious, I thought either

  1. I'm being more than usually dim
  2. it needs it's own entry here, so that others can check

Problem can be summarized as:

When using 2D input, can the '.' character be used for simple matrix multiplication???? Because it isn't working for me!

Entering the '.' character places a bold, midline dot between the two arguments, but executing the result gives "Error unable to parse". Converting to 1-D input, no issues - everything works as expected.I should also point out that

  1. I never normally use 2D-input for my own work
  2. the attached worksheet executes correctly in Maple 2017.3, X86 64 WINDOWS, Sep 13 2017, Build ID 1262472.

If this is reproducible then wtf!

restart; with(LinearAlgebra); kernelopts(version)

`Maple 2018.1, X86 64 WINDOWS, Jun 8 2018, Build ID 1321769`


A := RandomMatrix(2, 2); B := RandomMatrix(2, 2)

Matrix(2, 2, {(1, 1) = 44, (1, 2) = -31, (2, 1) = 92, (2, 2) = 67})


Matrix(%id = 18446744074378134462)



Error, unable to parse



LinearAlgebra:-Multiply(A, B)

Matrix(%id = 18446744074378136502)


A:= RandomMatrix(2, 2);
B:= RandomMatrix(2, 2);

Matrix(2, 2, {(1, 1) = -32, (1, 2) = -4, (2, 1) = -74, (2, 2) = 27})


Matrix(2, 2, {(1, 1) = -93, (1, 2) = -72, (2, 1) = -76, (2, 2) = -2})


Matrix(%id = 18446744074378132406)




In an unrelated thread, I provided the OP with some 1-D code, which contained the Array definition

TC:= Array(0...1001, fill=0)

Note the existence of three '.' characters in the range specification. This was a typo on my part, or my '.' key bounced, or something. The code containing the above definition "worked" with no problem, which, presumably, was why I didn't notice.

The Maple help does state (my emphasis)

Note that more than two dots in succession are also parsed as the range (..) operator.

although I wasn't making use of this fact - I just screwed up when typing the original.

The OP preferred to use 2-D input, and used cut-and-paste to transfer the above code, resulting in 2-D input, which is where the fun started. It seems(?) that when using 2-D input, more than two dots in succession is only interpreted as a straightforward range, if the total number of dots is even.

If the total number of dots is odd, then it appears(?) as if the 'final' dot is associated with the second number in the range as a 'decimal point', (so producing .1001 in the above example). This is then 'coerced/rounded' to an integer - ie it becomes '0', and the above Array definition is interpreted as

TC:= Array(0..0, fill=0)

Consequences in the following code are left to your imagination

Worth an SCR?




1 2 3 Page 1 of 3