tomleslie

13821 Reputation

20 Badges

14 years, 297 days

MaplePrimes Activity


These are questions asked by tomleslie

Generally when I respond to questions on this site, I make sure that I tick the checkbox requesting that I get an email when updates are made to the thread.

I've just realised that I have been receiving no such updates for a week or so. Two possibilities

  1. Problem with Mapleprimes website, meaning that email updates aren't being generated/sent
  2. Problem with my ISP

Before I try investigating (2) above, I'd just like to know if anyone else has seen any issue which might be explained by (1) above

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/fibon2019.mw .
 

Download fibon2019.mw

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):
               fi:
          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

(1)

 


 

Download fibon2018.mw

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

  restart;
  alpha:=[2,3,4,5];
#
# 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)}, `<`);
  whattype(%);
  sort( {abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)}, `>`);
  whattype(%);
#
# 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)], `<`);
  whattype(%);
  sort( [abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)], `>`);
  whattype(%);
#
# 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)]), `<`);
  whattype(%);
  sort(Array([abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)]), `>`);
  whattype(%);

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

 

{25, 26, 27, 28}

 

set

 

{25, 26, 27, 28}

 

set

 

[25, 26, 27, 28]

 

list

 

[28, 27, 26, 25]

 

list

 

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

 

Array

 

Array(%id = 18446744074423548974)

 

Array

(1)

 

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

 

Array

 

Array(%id = 18446744074423548974)

 

Array

(2)

 

Download sortSet.mw

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

https://www.mapleprimes.com/questions/225688-How-To-Compute-Inverse-Of-A-Matrix-For

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`

(1)

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)

(2)

A.B

Error, unable to parse

"A*B;"

 

LinearAlgebra:-Multiply(A, B)

Matrix(%id = 18446744074378136502)

(3)

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

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)

(4)

 

Download matMulProb.mw

1 2 3 4 5 6 Page 3 of 6